mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
bugfix:check Directory attr before create it
This commit is contained in:
parent
2fd48df9d9
commit
1ed41f8b21
|
@ -80,6 +80,8 @@ func (f *Filer) CreateEntry(entry *Entry) error {
|
||||||
if mkdirErr != nil {
|
if mkdirErr != nil {
|
||||||
return fmt.Errorf("mkdir %s: %v", dirPath, mkdirErr)
|
return fmt.Errorf("mkdir %s: %v", dirPath, mkdirErr)
|
||||||
}
|
}
|
||||||
|
} else if !dirEntry.IsDirectory() {
|
||||||
|
return fmt.Errorf("%s is a file", dirPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// cache the directory entry
|
// cache the directory entry
|
||||||
|
|
Loading…
Reference in a new issue