|
|
@@ -15,7 +15,7 @@ PR 3 of the review fixes plan (`docs/review-fixes-plan.md`). Part of 0.5.2; the
|
|
|
|
|
|
**New sample names are cleaned at assign (S1, assign).**
|
|
|
- A new pool file name is passed through `poolFileName` in `project` before the 001, 002 suffixes are added. A comment there gives the reason.
|
|
|
-- The helper replaces `/`, `\`, control characters, and the characters the device's FAT card forbids (`: * ? " < > |`) with `_`. A name that comes out empty, `.` or `..` becomes `sample.wav`. The sample name follows from the cleaned file name.
|
|
|
+- The helper replaces `/`, `\`, control characters, and the characters the device's FAT card forbids (`: * ? " < > |`) with `_`. A name Windows reserves for a device (`CON`, `PRN`, `AUX`, `NUL`, `COM1`–`COM9`, `LPT1`–`LPT9`, in any case and with any extension) gets `_` after that part, so `CON.wav` becomes `CON_.wav`. A name that comes out empty, `.` or `..` becomes `sample.wav`. The sample name follows from the cleaned file name.
|
|
|
- So `kick\one.wav`, which Linux and macOS allow, becomes `kick_one.wav`, and its export loads again.
|
|
|
- Load still accepts existing names; only new assignments change.
|
|
|
|
|
|
@@ -55,7 +55,8 @@ Against the old code, every new export test fails.
|
|
|
- Samples you assign are unaffected, since their paths are resolved at assign.
|
|
|
- **Making a rename fail.** The plan suggested a directory where the `.xpj` should go. With the new overwrite, that directory is simply moved aside and replaced, so it no longer fails. The tests instead swap the package's `rename` (normally `os.Rename`) for one that fails on chosen calls. This reaches every step on every system.
|
|
|
- **The source shown for a linked WAV.** It is the file the link points to, not the link.
|
|
|
-- **Not covered:** a WAV named like a Windows device (`CON.wav`, `aux.wav`) is still taken as it is. It can be written on Linux and macOS, but not on Windows. Say if you want it renamed too.
|
|
|
+- **Windows device names (bajdev, 2026-11-13).** These are renamed too. `ValidName` and `poolFileName` now share one list, `reservedOnWindows`.
|
|
|
+- **What the user sees.** Renaming is silent, like the 001 suffixes added for duplicate names. The pad shows the new name (`kick_one`), so the change is visible but not explained. Only names that could not be exported as they are change, and none of them can be created on Windows anyway.
|
|
|
- **On Windows, the link tests skip** unless developer mode is on, because creating links needs it. `TestBackslashNameExportsAndLoads` also skips there, because Windows file names cannot hold `\`.
|
|
|
|
|
|
## Testing
|