mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Implement encoding and decoding for Windows-invalid characters in file names
- Added `encode_path_name` and `decode_path_name` functions to handle encoding and decoding of invalid characters. - Updated `SyncbackRules` to include an option for encoding Windows-invalid characters during syncback. - Modified `name_for_inst` to conditionally encode invalid characters based on the new option. - Adjusted `ServeSession` and `InstanceContext` to support the new encoding feature. - Updated tests and snapshots to reflect changes in encoding behavior.
This commit is contained in:
parent
db87fa010f
commit
6d8c85682d
59 changed files with 350 additions and 53 deletions
|
|
@ -106,8 +106,15 @@ impl ServeSession {
|
|||
|
||||
let root_id = tree.get_root_id();
|
||||
|
||||
let instance_context =
|
||||
let decode_windows_invalid_chars = root_project
|
||||
.syncback_rules
|
||||
.as_ref()
|
||||
.map(|rules| rules.encode_windows_invalid_chars())
|
||||
.unwrap_or(false);
|
||||
|
||||
let mut instance_context =
|
||||
InstanceContext::with_emit_legacy_scripts(root_project.emit_legacy_scripts);
|
||||
instance_context.set_decode_windows_invalid_chars(decode_windows_invalid_chars);
|
||||
|
||||
log::trace!("Generating snapshot of instances from VFS");
|
||||
let snapshot = snapshot_from_vfs(&instance_context, &vfs, start_path)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue