lib/scanner: Support walking a symlink root (ref #4353)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4666
LGTM: AudriusButkevicius, imsodin
This commit is contained in:
Nicholas Rishel
2018-01-24 00:05:47 +00:00
committed by Audrius Butkevicius
parent 885e3f19bd
commit a505231774
6 changed files with 65 additions and 120 deletions

View File

@@ -31,6 +31,10 @@ func (i infiniteFS) Lstat(name string) (fs.FileInfo, error) {
return fakeInfo{name, i.filesize}, nil
}
func (i infiniteFS) Stat(name string) (fs.FileInfo, error) {
return fakeInfo{name, i.filesize}, nil
}
func (i infiniteFS) DirNames(name string) ([]string, error) {
// Returns a list of fake files and directories. Names are such that
// files appear before directories - this makes it so the scanner will