Browse Source

bugfix:check Directory attr before create it

pull/687/head
聂鹏 7 years ago
parent
commit
1ed41f8b21
  1. 2
      weed/filer2/filer.go

2
weed/filer2/filer.go

@ -80,6 +80,8 @@ func (f *Filer) CreateEntry(entry *Entry) error {
if mkdirErr != nil {
return fmt.Errorf("mkdir %s: %v", dirPath, mkdirErr)
}
} else if !dirEntry.IsDirectory() {
return fmt.Errorf("%s is a file", dirPath)
}
// cache the directory entry

Loading…
Cancel
Save