mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 02:17:57 +08:00
fuse mount: avoid lookup nil entry
fix https://github.com/chrislusf/seaweedfs/issues/1221
This commit is contained in:
@@ -71,7 +71,7 @@ func (ce *CommandEnv) checkDirectory(filerServer string, filerPort int64, path s
|
||||
|
||||
return ce.withFilerClient(filerServer, filerPort, func(client filer_pb.SeaweedFilerClient) error {
|
||||
|
||||
resp, lookupErr := client.LookupDirectoryEntry(context.Background(), &filer_pb.LookupDirectoryEntryRequest{
|
||||
resp, lookupErr := filer_pb.LookupEntry(client, &filer_pb.LookupDirectoryEntryRequest{
|
||||
Directory: dir,
|
||||
Name: name,
|
||||
})
|
||||
@@ -79,10 +79,6 @@ func (ce *CommandEnv) checkDirectory(filerServer string, filerPort int64, path s
|
||||
return lookupErr
|
||||
}
|
||||
|
||||
if resp.Entry == nil {
|
||||
return fmt.Errorf("entry not found")
|
||||
}
|
||||
|
||||
if !resp.Entry.IsDirectory {
|
||||
return fmt.Errorf("not a directory")
|
||||
}
|
||||
|
Reference in New Issue
Block a user