Mark project node as instigating source for instances from project

This commit is contained in:
Lucien Greathouse
2019-10-04 18:10:45 -07:00
parent c051153a1f
commit cb3211cf46
3 changed files with 22 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ use rbx_reflection::try_resolve_value;
use crate::{
imfs::{FsErrorKind, Imfs, ImfsEntry, ImfsFetcher},
project::{Project, ProjectNode},
snapshot::{InstanceMetadata, InstanceSnapshot},
snapshot::{InstanceMetadata, InstanceSnapshot, InstigatingSource},
};
use super::{
@@ -174,6 +174,11 @@ fn snapshot_project_node<F: ImfsFetcher>(
metadata.ignore_unknown_instances = true;
}
metadata.instigating_source = Some(InstigatingSource::ProjectNode(
instance_name.to_string(),
node.clone(),
));
Ok(Some(InstanceSnapshot {
snapshot_id: None,
name,