mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 22:17:25 +08:00
fix logic to read entry or not
This commit is contained in:
@@ -253,15 +253,16 @@ func (file *File) Forget() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (file *File) maybeLoadEntry(ctx context.Context) error {
|
func (file *File) maybeLoadEntry(ctx context.Context) error {
|
||||||
if (len(file.entry.HardLinkId) != 0) && file.isOpen <= 0 {
|
if file.isOpen > 0 {
|
||||||
entry, err := file.wfs.maybeLoadEntry(file.dir.FullPath(), file.Name)
|
return nil
|
||||||
if err != nil {
|
}
|
||||||
glog.V(3).Infof("maybeLoadEntry file %s/%s: %v", file.dir.FullPath(), file.Name, err)
|
entry, err := file.wfs.maybeLoadEntry(file.dir.FullPath(), file.Name)
|
||||||
return err
|
if err != nil {
|
||||||
}
|
glog.V(3).Infof("maybeLoadEntry file %s/%s: %v", file.dir.FullPath(), file.Name, err)
|
||||||
if entry != nil {
|
return err
|
||||||
file.setEntry(entry)
|
}
|
||||||
}
|
if entry != nil {
|
||||||
|
file.setEntry(entry)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user