Fix folders having empty names

This commit is contained in:
Lucien Greathouse
2019-01-16 17:28:06 -08:00
parent 3620a9d256
commit 4cfdc72c00

View File

@@ -187,15 +187,15 @@ fn snapshot_imfs_directory<'source>(
}); });
let mut snapshot = if directory.children.contains(&init_path) { let mut snapshot = if directory.children.contains(&init_path) {
snapshot_imfs_path(imfs, metadata, &init_path, Some(snapshot_name.clone()))?.unwrap() snapshot_imfs_path(imfs, metadata, &init_path, Some(snapshot_name))?.unwrap()
} else if directory.children.contains(&init_server_path) { } else if directory.children.contains(&init_server_path) {
snapshot_imfs_path(imfs, metadata, &init_server_path, Some(snapshot_name.clone()))?.unwrap() snapshot_imfs_path(imfs, metadata, &init_server_path, Some(snapshot_name))?.unwrap()
} else if directory.children.contains(&init_client_path) { } else if directory.children.contains(&init_client_path) {
snapshot_imfs_path(imfs, metadata, &init_client_path, Some(snapshot_name.clone()))?.unwrap() snapshot_imfs_path(imfs, metadata, &init_client_path, Some(snapshot_name))?.unwrap()
} else { } else {
RbxSnapshotInstance { RbxSnapshotInstance {
class_name: Cow::Borrowed("Folder"), class_name: Cow::Borrowed("Folder"),
name: Cow::Borrowed(""), name: snapshot_name,
properties: HashMap::new(), properties: HashMap::new(),
children: Vec::new(), children: Vec::new(),
source_path: Some(directory.path.to_owned()), source_path: Some(directory.path.to_owned()),