mirror of
https://github.com/syncthing/syncthing.git
synced 2026-10-27 13:38:30 -04:00
fixes #9499
This commit is contained in:
1 parent
0756e42a85
commit
0fe6d97d3d
1 file changed
+4
@@ -924,6 +924,8 @@ func (f *fakeFile) Name() string {
|
||||
if f.presentedName != "" {
|
||||
return f.presentedName
|
||||
}
|
||||
f.mut.Lock()
|
||||
defer f.mut.Unlock()
|
||||
return f.name
|
||||
}
|
||||
|
||||
@@ -949,7 +951,9 @@ func (f *fakeFile) Truncate(size int64) error {
|
||||
}
|
||||
|
||||
func (f *fakeFile) Stat() (FileInfo, error) {
|
||||
f.mut.Lock()
|
||||
info := &fakeFileInfo{*f.fakeEntry}
|
||||
f.mut.Unlock()
|
||||
if f.presentedName != "" {
|
||||
info.name = f.presentedName
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user