Add specific errors for the failures, resulting in this rather than just the generic "invalid filename": [MRIW7] 08:50:50 INFO: Puller (folder default, item "NUL"): syncing: filename is invalid: name is reserved [MRIW7] 08:50:50 INFO: Puller (folder default, item "fail."): syncing: filename is invalid: name ends with space or period [MRIW7] 08:50:50 INFO: Puller (folder default, item "sup:yo"): syncing: filename is invalid: name contains reserved character [MRIW7] 08:50:50 INFO: default: Failed to sync 3 items
This commit is contained in:
@@ -337,7 +337,7 @@ func (f *sendReceiveFolder) processNeeded(snap *db.Snapshot, dbUpdateChan chan<-
|
||||
l.Debugln(f, "Handling ignored file", file)
|
||||
dbUpdateChan <- dbUpdateJob{file, dbUpdateInvalidate}
|
||||
|
||||
case runtime.GOOS == "windows" && fs.WindowsInvalidFilename(file.Name):
|
||||
case runtime.GOOS == "windows" && fs.WindowsInvalidFilename(file.Name) != nil:
|
||||
if file.IsDeleted() {
|
||||
// Just pretend we deleted it, no reason to create an error
|
||||
// about a deleted file that we can't have anyway.
|
||||
@@ -345,8 +345,9 @@ func (f *sendReceiveFolder) processNeeded(snap *db.Snapshot, dbUpdateChan chan<-
|
||||
// ignored at some point.
|
||||
dbUpdateChan <- dbUpdateJob{file, dbUpdateDeleteFile}
|
||||
} else {
|
||||
// We can't pull an invalid file.
|
||||
f.newPullError(file.Name, fs.ErrInvalidFilename)
|
||||
// We can't pull an invalid file. Grab the error again since
|
||||
// we couldn't assign it directly in the case clause.
|
||||
f.newPullError(file.Name, fs.WindowsInvalidFilename(file.Name))
|
||||
// No reason to retry for this
|
||||
changed--
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user