|
@ -248,7 +248,7 @@ func (f *Filer) ensureParentDirectoryEntry(ctx context.Context, entry *Entry, di |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
dirPath := "/" + util.Join(dirParts[:level]...) |
|
|
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
|
|
|
// check the store directly
|
|
|
glog.V(4).Infof("find uncached directory: %s", dirPath) |
|
|
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
|
|
|
// no such existing directory
|
|
|
if dirEntry == nil { |
|
|
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) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|