forked from rojo-rbx/rojo
Block usage of "Name" or "Parent" in $properties (#413)
* Ignore usage of "Name" or "Parent" in $properties * Use match instead of array * Add changelog entry Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
This commit is contained in:
@@ -182,6 +182,20 @@ pub fn snapshot_project_node(
|
||||
)
|
||||
})?;
|
||||
|
||||
match key.as_str() {
|
||||
"Name" | "Parent" => {
|
||||
log::warn!(
|
||||
"Property '{}' cannot be set manually, ignoring. Attempted to set in '{}' at {}",
|
||||
key,
|
||||
instance_name,
|
||||
project_path.display()
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
_ => {}
|
||||
}
|
||||
|
||||
properties.insert(key.clone(), value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user