Skip to content

Commit

Permalink
Don't serialize LuaSourceContainer.ScriptGuid for scripts originati…
Browse files Browse the repository at this point in the history
…ng from `$path` or `.luau` files
  • Loading branch information
Dekkonot committed Aug 22, 2024
1 parent f2c65fc commit 6aa8aa6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/syncback/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ impl<'sync> SyncbackSnapshot<'sync> {

pub fn filter_out_property(inst: &Instance, prop_name: &str) -> bool {
match inst.class.as_str() {
"Script" | "LocalScript" | "ModuleScript" => prop_name == "Source",
"Script" | "LocalScript" | "ModuleScript" => {
// These properties shouldn't be set by scripts that are created via
// `$path` or via being on the file system.
prop_name == "Source" || prop_name == "ScriptGuid"
}
"LocalizationTable" => prop_name == "Contents",
"StringValue" => prop_name == "Value",
_ => false,
Expand Down

0 comments on commit 6aa8aa6

Please sign in to comment.