[Request] Preserve relative Output Path #579

Closed
opened 2026-01-29 16:18:47 +00:00 by claunia · 8 comments
Owner

Originally created by @tjanas on GitHub (Jul 20, 2023).

Originally assigned to: @mnadareski on GitHub.

Is your feature request related to a problem? Please describe.
I would like to use relative output paths in MPF. This may also result in eliminating sensitive information from path names that would be present in log files.

Describe the solution you'd like
Relative paths in MPF that would also be used for --image-path when executing redumper.

Describe alternatives you've considered
Running redumper manually instead of via MPF.

Originally created by @tjanas on GitHub (Jul 20, 2023). Originally assigned to: @mnadareski on GitHub. **Is your feature request related to a problem? Please describe.** I would like to use relative output paths in MPF. This may also result in eliminating sensitive information from path names that would be present in log files. **Describe the solution you'd like** Relative paths in MPF that would also be used for `--image-path` when executing redumper. **Describe alternatives you've considered** Running redumper manually instead of via MPF.
claunia added the enhancement label 2026-01-29 16:18:47 +00:00
Author
Owner

@mnadareski commented on GitHub (Jul 24, 2023):

As mentioned on Discord, I'm hesitant to keep relative paths after normalization (or always using relative paths if it's under the same tree) because some tools may have issues with relative paths. I'm still paranoid from some past behavior of at least one of the included applications, so I'm going to keep them as absolute paths for now. I will leave this open, however, as I hope that this is not necessary in the future.

@mnadareski commented on GitHub (Jul 24, 2023): As mentioned on Discord, I'm hesitant to keep relative paths after normalization (or always using relative paths if it's under the same tree) because some tools may have issues with relative paths. I'm still paranoid from some past behavior of at least one of the included applications, so I'm going to keep them as absolute paths for now. I will leave this open, however, as I hope that this is not necessary in the future.
Author
Owner

@mnadareski commented on GitHub (Oct 11, 2023):

As an update to this, the code has been modified internally to allow this at a future point, either by default or via an option.

@mnadareski commented on GitHub (Oct 11, 2023): As an update to this, the code has been modified internally to allow this at a future point, either by default or via an option.
Author
Owner

@Deterous commented on GitHub (Oct 16, 2023):

I think I tested changing the default to relative path here: https://github.com/SabreTools/MPF/compare/master...Deterous:MPF:relative-path
Build artifacts: https://ci.appveyor.com/project/Deterous/mpf/builds/48286773/artifacts
However, after dumping the redumper logs still do show the full path.
Either I've missed something (likely), something else needs changing in MPF (unlikely), or perhaps redumper does need to change its logging.

@Deterous commented on GitHub (Oct 16, 2023): I _think_ I tested changing the default to relative path here: https://github.com/SabreTools/MPF/compare/master...Deterous:MPF:relative-path Build artifacts: https://ci.appveyor.com/project/Deterous/mpf/builds/48286773/artifacts However, after dumping the redumper logs still do show the full path. Either I've missed something (likely), something else needs changing in MPF (unlikely), or perhaps redumper does need to change its logging.
Author
Owner

@tjanas commented on GitHub (Oct 16, 2023):

So far following is working fine for me when running Redumper directly (not invoked by MPF) where its working directory is the base MPF directory. I don't see any full output paths being printed in the log.

=== 2023-10-16 09:38:18 ========================================================
redumper v2023.10.14 build_230 [Oct 14 2023, 23:19:39]

command line: Programs\Redumper\redumper.exe --verbose --image-path=ISO\TestDump --image-name=TestDump --retries=10 --debug

drive path: F:
drive: ASUS - BW-16D1HT (revision level: 3.10, vendor specific: WM01601KLZL4T85024)
drive configuration: GENERIC (read offset: +6, C2 shift: 0, pre-gap start: -135, read method: BE_CDDA, sector order: DATA_C2_SUB)

image path: ISO\TestDump
image name: TestDump

*** DUMP

disc TOC:
  track 1 {  data }
    index 01 { LBA:      0, MSF: 00:02:00 }
  track A {  data }
    index 01 { LBA: 293296, MSF: 65:12:46 }
@tjanas commented on GitHub (Oct 16, 2023): So far following is working fine for me when running Redumper directly (not invoked by MPF) where its working directory is the base MPF directory. I don't see any full output paths being printed in the log. ``` === 2023-10-16 09:38:18 ======================================================== redumper v2023.10.14 build_230 [Oct 14 2023, 23:19:39] command line: Programs\Redumper\redumper.exe --verbose --image-path=ISO\TestDump --image-name=TestDump --retries=10 --debug drive path: F: drive: ASUS - BW-16D1HT (revision level: 3.10, vendor specific: WM01601KLZL4T85024) drive configuration: GENERIC (read offset: +6, C2 shift: 0, pre-gap start: -135, read method: BE_CDDA, sector order: DATA_C2_SUB) image path: ISO\TestDump image name: TestDump *** DUMP disc TOC: track 1 { data } index 01 { LBA: 0, MSF: 00:02:00 } track A { data } index 01 { LBA: 293296, MSF: 65:12:46 } ```
Author
Owner

@Deterous commented on GitHub (Oct 16, 2023):

So far following is working fine for me when running Redumper directly (not invoked by MPF) where its working directory is the base MPF directory. I don't see any full output paths being printed in the log.

=== 2023-10-16 09:38:18 ========================================================
redumper v2023.10.14 build_230 [Oct 14 2023, 23:19:39]

command line: Programs\Redumper\redumper.exe --verbose --image-path=ISO\TestDump --image-name=TestDump --retries=10 --debug

drive path: F:
drive: ASUS - BW-16D1HT (revision level: 3.10, vendor specific: WM01601KLZL4T85024)
drive configuration: GENERIC (read offset: +6, C2 shift: 0, pre-gap start: -135, read method: BE_CDDA, sector order: DATA_C2_SUB)

image path: ISO\TestDump
image name: TestDump

*** DUMP

disc TOC:
  track 1 {  data }
    index 01 { LBA:      0, MSF: 00:02:00 }
  track A {  data }
    index 01 { LBA: 293296, MSF: 65:12:46 }

Did you run it standalone in Windows?

@Deterous commented on GitHub (Oct 16, 2023): > So far following is working fine for me when running Redumper directly (not invoked by MPF) where its working directory is the base MPF directory. I don't see any full output paths being printed in the log. > > ``` > === 2023-10-16 09:38:18 ======================================================== > redumper v2023.10.14 build_230 [Oct 14 2023, 23:19:39] > > command line: Programs\Redumper\redumper.exe --verbose --image-path=ISO\TestDump --image-name=TestDump --retries=10 --debug > > drive path: F: > drive: ASUS - BW-16D1HT (revision level: 3.10, vendor specific: WM01601KLZL4T85024) > drive configuration: GENERIC (read offset: +6, C2 shift: 0, pre-gap start: -135, read method: BE_CDDA, sector order: DATA_C2_SUB) > > image path: ISO\TestDump > image name: TestDump > > *** DUMP > > disc TOC: > track 1 { data } > index 01 { LBA: 0, MSF: 00:02:00 } > track A { data } > index 01 { LBA: 293296, MSF: 65:12:46 } > ``` Did you run it standalone in Windows?
Author
Owner

@tjanas commented on GitHub (Oct 16, 2023):

Yes I did.

@tjanas commented on GitHub (Oct 16, 2023): Yes I did.
Author
Owner

@Deterous commented on GitHub (Oct 26, 2023):

https://github.com/superg/redumper/issues/85#issuecomment-1777833374

Redumper (build 239) has now changed such that even when called from a full path, the logs do not include sensitive information as long as the image-path argument is a relative path.

@tjanas I assume you have used CMD when calling redumper, as superg found that when calling from Powershell or Visual studio from a relative path (as I did), it still passes the full path to redumper.

I have submitted a PR (#589) with the changes to use relative paths inside MPF, and tested that redumper (build 239) and DIC do not have the full path anywhere in the logs (for my dumps, anyway). Hopefully this fixes this issue. Larger changes could potentially be made such that MPF calls redumper with a relative path, but that's not something I'm capable of doing, and the logs are clean after this PR anyway.

@Deterous commented on GitHub (Oct 26, 2023): https://github.com/superg/redumper/issues/85#issuecomment-1777833374 Redumper (build 239) has now changed such that even when called from a full path, the logs do not include sensitive information as long as the image-path argument is a relative path. @tjanas I assume you have used CMD when calling redumper, as superg found that when calling from Powershell or Visual studio from a relative path (as I did), it still passes the full path to redumper. I have submitted a PR (#589) with the changes to use relative paths inside MPF, and tested that redumper (build 239) and DIC do not have the full path anywhere in the logs (for my dumps, anyway). Hopefully this fixes this issue. Larger changes could potentially be made such that MPF calls redumper with a relative path, but that's not something I'm capable of doing, and the logs are clean after this PR anyway.
Author
Owner

@mnadareski commented on GitHub (Oct 26, 2023):

Fixed by https://github.com/SabreTools/MPF/pull/589

@mnadareski commented on GitHub (Oct 26, 2023): Fixed by https://github.com/SabreTools/MPF/pull/589
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/MPF#579