From b1ddfc3a49439fa0e13d51c0868f5ba5573ef14d Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Wed, 23 Jan 2019 18:10:29 -0800 Subject: [PATCH] Fix adding/removing files in folders that have init scripts --- server/src/rbx_session.rs | 3 +++ server/src/rbx_snapshot.rs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/rbx_session.rs b/server/src/rbx_session.rs index 37dbe1d0..e1edfa29 100644 --- a/server/src/rbx_session.rs +++ b/server/src/rbx_session.rs @@ -94,6 +94,9 @@ impl RbxSession { trace!("Snapshotting path {}", path_to_snapshot.display()); let path_metadata = self.metadata_per_path.get(&path_to_snapshot).unwrap(); + + trace!("Metadata for path: {:?}", path_metadata); + let instance_id = path_metadata.instance_id .expect("Instance did not exist in tree"); diff --git a/server/src/rbx_snapshot.rs b/server/src/rbx_snapshot.rs index 06a8e2ce..c1f4c39a 100644 --- a/server/src/rbx_snapshot.rs +++ b/server/src/rbx_snapshot.rs @@ -205,12 +205,14 @@ fn snapshot_imfs_directory<'source>( properties: HashMap::new(), children: Vec::new(), metadata: MetadataPerInstance { - source_path: Some(directory.path.to_owned()), + source_path: None, ignore_unknown_instances: false, }, } }; + snapshot.metadata.source_path = Some(directory.path.to_owned()); + for child_path in &directory.children { let child_name = child_path .file_name().expect("Couldn't extract file name")