lib/db: Have prefix should be normalized

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3206
This commit is contained in:
Audrius Butkevicius 2016-05-28 04:18:31 +00:00 committed by Jakob Borg
parent 92a23da3ec
commit c2dc4a8e06

View File

@ -181,7 +181,7 @@ func (s *FileSet) WithHaveTruncated(device protocol.DeviceID, fn Iterator) {
func (s *FileSet) WithPrefixedHaveTruncated(device protocol.DeviceID, prefix string, fn Iterator) {
l.Debugf("%s WithPrefixedHaveTruncated(%v)", s.folder, device)
s.db.withHave([]byte(s.folder), device[:], []byte(prefix), true, nativeFileIterator(fn))
s.db.withHave([]byte(s.folder), device[:], []byte(osutil.NormalizedFilename(prefix)), true, nativeFileIterator(fn))
}
func (s *FileSet) WithGlobal(fn Iterator) {
l.Debugf("%s WithGlobal()", s.folder)