mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 21:41:37 +00:00
Enhance syncback logic to preserve nested project files
- Updated the syncback loop to skip removal of nested project files, ensuring project structure is maintained. - Added logging to indicate when nested project files are being skipped during the syncback process.
This commit is contained in:
parent
a8752b6b8d
commit
e342f00306
2 changed files with 8 additions and 2 deletions
|
|
@ -4,5 +4,3 @@ expression: normalized_stdout
|
||||||
---
|
---
|
||||||
Writing src/modules/ClientModule.luau
|
Writing src/modules/ClientModule.luau
|
||||||
Writing src/modules/ServerModule.luau
|
Writing src/modules/ServerModule.luau
|
||||||
Removing client-only.project.json5
|
|
||||||
Removing server-only.project.json5
|
|
||||||
|
|
|
||||||
|
|
@ -418,6 +418,14 @@ pub fn syncback_loop_with_stats(
|
||||||
log::debug!("Skipping project file: {}", old_path.display());
|
log::debug!("Skipping project file: {}", old_path.display());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// Never remove any nested project files - they define project structure
|
||||||
|
// and may be referenced via $path from other project files
|
||||||
|
if let Some(file_name) = old_path_norm.file_name().and_then(|n| n.to_str()) {
|
||||||
|
if file_name.ends_with(".project.json5") || file_name.ends_with(".project.json") {
|
||||||
|
log::debug!("Skipping nested project file: {}", old_path.display());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
// Skip if this exact path is being written to
|
// Skip if this exact path is being written to
|
||||||
if added_paths.contains(&old_path_norm) {
|
if added_paths.contains(&old_path_norm) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue