1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-09-16 22:10:42 +02:00

fix directory checking

This commit is contained in:
Chris Lu 2020-03-23 21:36:39 -07:00
parent e666aeece2
commit b51fa81f0e

View file

@ -69,7 +69,11 @@ func (ce *CommandEnv) checkDirectory(path string) error {
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