aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_fs_mv.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-02-25 11:13:06 -0800
committerChris Lu <chris.lu@gmail.com>2020-02-25 11:13:06 -0800
commit7d10fdf73720fb3234cd5cacfaf10fb79590d754 (patch)
tree3c8d1170824d605bdb6532cf657b85824fd848dd /weed/shell/command_fs_mv.go
parente86da5a4918e0cf663a8c592387c72c850647e4e (diff)
downloadseaweedfs-7d10fdf73720fb3234cd5cacfaf10fb79590d754.tar.xz
seaweedfs-7d10fdf73720fb3234cd5cacfaf10fb79590d754.zip
fix directory lookup nil
Diffstat (limited to 'weed/shell/command_fs_mv.go')
-rw-r--r--weed/shell/command_fs_mv.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/shell/command_fs_mv.go b/weed/shell/command_fs_mv.go
index e77755921..b9301ad3c 100644
--- a/weed/shell/command_fs_mv.go
+++ b/weed/shell/command_fs_mv.go
@@ -65,7 +65,7 @@ func (c *commandFsMv) Do(args []string, commandEnv *CommandEnv, writer io.Writer
var targetDir, targetName string
// moving a file or folder
- if err == nil && respDestinationLookupEntry.Entry.IsDirectory {
+ if err == nil && respDestinationLookupEntry.Entry!= nil && respDestinationLookupEntry.Entry.IsDirectory {
// to a directory
targetDir = filepath.ToSlash(filepath.Join(destinationDir, destinationName))
targetName = sourceName