This commit is contained in:
@@ -7,6 +7,7 @@ package protocol
|
|||||||
// Windows uses backslashes as file separator
|
// Windows uses backslashes as file separator
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
@@ -39,7 +40,13 @@ func fixupFiles(files []FileInfo) []FileInfo {
|
|||||||
var out []FileInfo
|
var out []FileInfo
|
||||||
for i := range files {
|
for i := range files {
|
||||||
if strings.Contains(files[i].Name, `\`) {
|
if strings.Contains(files[i].Name, `\`) {
|
||||||
l.Warnf("Dropping index entry for %s, contains invalid path separator", files[i].Name)
|
msg := fmt.Sprintf("Dropping index entry for %s, contains invalid path separator", files[i].Name)
|
||||||
|
if files[i].Deleted {
|
||||||
|
// Dropping a deleted item doesn't have any consequences.
|
||||||
|
l.Debugln(msg)
|
||||||
|
} else {
|
||||||
|
l.Warnln(msg)
|
||||||
|
}
|
||||||
if out == nil {
|
if out == nil {
|
||||||
// Most incoming updates won't contain anything invalid, so
|
// Most incoming updates won't contain anything invalid, so
|
||||||
// we delay the allocation and copy to output slice until we
|
// we delay the allocation and copy to output slice until we
|
||||||
|
|||||||
Reference in New Issue
Block a user