chunk_store: create parent directories
'datastore create storename /path/to/dir/that/may/not/exist' should work. Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
This commit is contained in:
parent
ebfb2df22b
commit
14f1e63067
|
@ -93,11 +93,11 @@ impl ChunkStore {
|
|||
|
||||
let chunk_dir = Self::chunk_dir(&base);
|
||||
|
||||
if let Err(err) = std::fs::create_dir(&base) {
|
||||
if let Err(err) = std::fs::create_dir_all(&base) {
|
||||
bail!("unable to create chunk store '{}' at {:?} - {}", name, base, err);
|
||||
}
|
||||
|
||||
if let Err(err) = std::fs::create_dir(&chunk_dir) {
|
||||
if let Err(err) = std::fs::create_dir_all(&chunk_dir) {
|
||||
bail!("unable to create chunk store '{}' subdir {:?} - {}", name, chunk_dir, err);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue