dropbox: make disallowed filenames return no retry error - fixes #3569
Before this change we silently skipped uploads to dropbox of disallowed file names. However this then caused "corrupted on transfer" errors because the sizes were wrong. After this change we return an no retry error which will mean that the sync fails (as it should - not all files were uploaded) but no unecessary retries happened.
This commit is contained in:
parent
1833167d10
commit
8c1edf410c
1 changed files with 1 additions and 2 deletions
|
@ -1130,8 +1130,7 @@ func (o *Object) uploadChunked(in0 io.Reader, commitInfo *files.CommitInfo, size
|
|||
func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) error {
|
||||
remote := o.remotePath()
|
||||
if ignoredFiles.MatchString(remote) {
|
||||
fs.Logf(o, "File name disallowed - not uploading")
|
||||
return nil
|
||||
return fserrors.NoRetryError(errors.Errorf("file name %q is disallowed - not uploading", path.Base(remote)))
|
||||
}
|
||||
commitInfo := files.NewCommitInfo(enc.FromStandardPath(o.remotePath()))
|
||||
commitInfo.Mode.Tag = "overwrite"
|
||||
|
|
Loading…
Reference in a new issue