mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-08-24 22:23:41 +08:00
fix directory checking
This commit is contained in:
parent
e666aeece2
commit
b51fa81f0e
@ -69,7 +69,11 @@ func (ce *CommandEnv) checkDirectory(path string) error {
|
|||||||
|
|
||||||
dir, name := util.FullPath(path).DirAndName()
|
dir, name := util.FullPath(path).DirAndName()
|
||||||
|
|
||||||
_, err := filer_pb.Exists(ce, dir, name, true)
|
exists, err := filer_pb.Exists(ce, dir, name, true)
|
||||||
|
|
||||||
|
if !exists {
|
||||||
|
return fmt.Errorf("%s is not a directory", path)
|
||||||
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user