Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

fix directory checking

Chris Lub51fa81f0e7c
diff --git a/weed/shell/commands.go b/weed/shell/commands.go
index 7e240de5f6..6e40380e0f 100644
--- a/weed/shell/commands.go
+++ b/weed/shell/commands.go
@@ -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