mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 02:48:59 +00:00
fixes #9499
This commit is contained in:
parent
0756e42a85
commit
0fe6d97d3d
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user