Browse Source

fix logic to read entry or not

pull/1566/head
Chris Lu 4 years ago
parent
commit
91fd311f7a
  1. 5
      weed/filesys/file.go

5
weed/filesys/file.go

@ -253,7 +253,9 @@ func (file *File) Forget() {
}
func (file *File) maybeLoadEntry(ctx context.Context) error {
if (len(file.entry.HardLinkId) != 0) && file.isOpen <= 0 {
if file.isOpen > 0 {
return nil
}
entry, err := file.wfs.maybeLoadEntry(file.dir.FullPath(), file.Name)
if err != nil {
glog.V(3).Infof("maybeLoadEntry file %s/%s: %v", file.dir.FullPath(), file.Name, err)
@ -262,7 +264,6 @@ func (file *File) maybeLoadEntry(ctx context.Context) error {
if entry != nil {
file.setEntry(entry)
}
}
return nil
}

Loading…
Cancel
Save