mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 06:07:58 +08:00
fuse mount: avoid lookup nil entry
fix https://github.com/chrislusf/seaweedfs/issues/1221
This commit is contained in:
@@ -58,12 +58,12 @@ func (c *commandFsMv) Do(args []string, commandEnv *CommandEnv, writer io.Writer
|
||||
Name: destinationDir,
|
||||
Directory: destinationName,
|
||||
}
|
||||
respDestinationLookupEntry, err := client.LookupDirectoryEntry(context.Background(), destinationRequest)
|
||||
respDestinationLookupEntry, err := filer_pb.LookupEntry(client, destinationRequest)
|
||||
|
||||
var targetDir, targetName string
|
||||
|
||||
// moving a file or folder
|
||||
if err == nil && respDestinationLookupEntry.Entry != nil && respDestinationLookupEntry.Entry.IsDirectory {
|
||||
if err == nil && respDestinationLookupEntry.Entry.IsDirectory {
|
||||
// to a directory
|
||||
targetDir = filepath.ToSlash(filepath.Join(destinationDir, destinationName))
|
||||
targetName = sourceName
|
||||
|
Reference in New Issue
Block a user