Uses random paths with slashes for storagedriver tests, adds edge cases
This replaces only using flat filenames, to better test nested file behaviors. Fixed inmemory/mfs.go and filesystem/driver.go after finding bugs with the new tests and test behavior.
This commit is contained in:
@@ -203,6 +203,10 @@ func (d *Driver) Move(sourcePath string, destPath string) error {
|
||||
return storagedriver.PathNotFoundError{Path: sourcePath}
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(path.Dir(dest), 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err := os.Rename(source, dest)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user