[Problem] Relative output path is improperly sanitized #492

Closed
opened 2026-01-29 16:17:21 +00:00 by claunia · 1 comment
Owner

Originally created by @CookiePLMonster on GitHub (Feb 21, 2023).

Originally assigned to: @mnadareski on GitHub.

Version
What version are you using?

  • Stable release - 2.4
  • WIP release 49800cf0ed
    (issue happens on both)

Build
What runtime version are you using?

  • .NET Framework 4.8 running on Windows 10

Describe the issue
Specifying a relative output path that traverses upwards should technically be supported, but it misbehaves. Instead of .. advancing the directory up, it gets sanitized to __ and creates a subdirectory.

To Reproduce
Steps to reproduce the behavior - these steps assume MPF resides in F:\MPF:

  1. Open MPF.
  2. Set an Output directory to ..\dumps.
  3. Start dumping any disc - in my case it's via DIC, but I suspect any media may be affected.
  4. Observe that the dump and logs are being created inside F:\MPF\__\dumps.

Expected behavior
Dumps should be created in F:\dumps.

Originally created by @CookiePLMonster on GitHub (Feb 21, 2023). Originally assigned to: @mnadareski on GitHub. **Version** What version are you using? - [x] Stable release - 2.4 - [x] WIP release https://github.com/SabreTools/MPF/commit/49800cf0edddfe76942f4164a6df95a131ed6e73 (issue happens on both) **Build** What runtime version are you using? - [x] .NET Framework 4.8 running on **Windows 10** **Describe the issue** Specifying a relative output path that traverses upwards should technically be supported, but it misbehaves. Instead of `..` advancing the directory up, it gets sanitized to `__` and creates a subdirectory. **To Reproduce** Steps to reproduce the behavior - **these steps assume MPF resides in `F:\MPF`**: 1. Open MPF. 2. Set an Output directory to `..\dumps`. 3. Start dumping any disc - in my case it's via DIC, but I suspect any media may be affected. 4. Observe that the dump and logs are being created inside `F:\MPF\__\dumps`. **Expected behavior** Dumps should be created in `F:\dumps`.
claunia added the bug label 2026-01-29 16:17:21 +00:00
Author
Owner

@CookiePLMonster commented on GitHub (Mar 11, 2023):

Either not fixed or regressed back to how it was, tested on fa04461631.
unfix

@CookiePLMonster commented on GitHub (Mar 11, 2023): Either not fixed or regressed back to how it was, tested on fa04461631277fda72d849fb8e4944ede308f4f9. ![unfix](https://user-images.githubusercontent.com/7947461/224489176-1bab1633-c983-4fac-81fa-58f1f41bc383.jpg)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/MPF#492