diff --git a/yama/src/operations/storing.rs b/yama/src/operations/storing.rs index 563464a..775a0f6 100644 --- a/yama/src/operations/storing.rs +++ b/yama/src/operations/storing.rs @@ -323,7 +323,12 @@ pub fn store_without_pointer_ops( 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, }, )?;