New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty file field in log when normalizePath failed #5369

Closed
piotrrotter opened this Issue Dec 12, 2018 · 0 comments

Comments

Projects
None yet
3 participants
@piotrrotter
Copy link

piotrrotter commented Dec 12, 2018

Hi,

I get issue with logging normalizing failures, with empty file field:

Dec 12 08:27:48 XXXXXXXXXXX syncthing[1438]: [E6UP4] INFO: Scanner (folder var-www, file ""): normalizing path: item has UTF8 encoding conflict with another item

When ewerything in normalizePath then it returns empty path
~/go/src/github.com/syncthing/syncthing/lib/scanner/walk.go:468
func (w *walker) normalizePath(path string, info fs.FileInfo) (normPath string, err error) {
...
return "", errUTF8Conflict
}

And this empty path i logged
~/go/src/github.com/syncthing/syncthing/lib/scanner/walk.go:290
func (w *walker) handleItem(ctx context.Context, path string, toHashChan chan<- protocol.FileInfo, finishedChan chan<- ScanResult, skip error) error {
...
path, err = w.normalizePath(path, info)
if err != nil {
w.handleError(ctx, "normalizing path", path, err, finishedChan)
return skip
}

I dirty fix this by:

       oldpath := path
       path, err = w.normalizePath(path, info)
       if err != nil {
                  w.handleError(ctx, "normalizing path", oldpath, err, finishedChan)
                  return skip
       }

Syncthing Version: v0.14.54
OS Version: Debian 9

@imsodin imsodin self-assigned this Dec 12, 2018

@imsodin imsodin added the bug label Dec 12, 2018

imsodin added a commit to imsodin/syncthing that referenced this issue Dec 12, 2018

imsodin added a commit to imsodin/syncthing that referenced this issue Dec 12, 2018

@calmh calmh closed this in #5370 Dec 12, 2018

calmh added a commit that referenced this issue Dec 12, 2018

@calmh calmh modified the milestones: v0.14.56, v0.14.55 Dec 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment