diff options
Diffstat (limited to 'weed/filer/filer.go')
| -rw-r--r-- | weed/filer/filer.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/weed/filer/filer.go b/weed/filer/filer.go index df377a135..91ba0819a 100644 --- a/weed/filer/filer.go +++ b/weed/filer/filer.go @@ -248,7 +248,7 @@ func (f *Filer) ensureParentDirectoryEntry(ctx context.Context, entry *Entry, di } dirPath := "/" + util.Join(dirParts[:level]...) - // fmt.Printf("%d directory: %+v\n", i, dirPath) + // fmt.Printf("%d dirPath: %+v\n", level, dirPath) // check the store directly glog.V(4).Infof("find uncached directory: %s", dirPath) @@ -257,9 +257,11 @@ func (f *Filer) ensureParentDirectoryEntry(ctx context.Context, entry *Entry, di // no such existing directory if dirEntry == nil { - if len(dirParts) >= 2 && level == 2 && dirParts[0] == "buckets" { - if err := s3bucket.VerifyS3BucketName(dirParts[1]); err != nil { - return fmt.Errorf("invalid bucket name %s: %v", dirParts[1], err) + // fmt.Printf("dirParts: %v %v %v\n", dirParts[0], dirParts[1], dirParts[2]) + // dirParts[0] == "" and dirParts[1] == "buckets" + if len(dirParts) >= 3 && dirParts[1] == "buckets" { + if err := s3bucket.VerifyS3BucketName(dirParts[2]); err != nil { + return fmt.Errorf("invalid bucket name %s: %v", dirParts[2], err) } } |
