Don't crash when backing up the root directory because it has no name
This commit is contained in:
parent
001d626ccd
commit
d62e864bee
|
@ -323,7 +323,12 @@ pub fn store_without_pointer_ops<PT: ProgressTracker>(
|
|||
let chunk_ref = commands::store_tree_node(
|
||||
&pile,
|
||||
&RootTreeNode {
|
||||
name: root_dir.file_name().unwrap().to_str().unwrap().to_owned(),
|
||||
name: root_dir
|
||||
.file_name()
|
||||
.map(|s| s.to_str())
|
||||
.flatten()
|
||||
.unwrap_or("_root")
|
||||
.to_owned(),
|
||||
node: root_node,
|
||||
},
|
||||
)?;
|
||||
|
|
Loading…
Reference in New Issue