mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-03 21:29:27 +00:00
[Request] Preserve relative Output Path #579
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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-pathwhen executing redumper.Describe alternatives you've considered
Running redumper manually instead of via MPF.
@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 (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.
@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.
@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.
@Deterous commented on GitHub (Oct 16, 2023):
Did you run it standalone in Windows?
@tjanas commented on GitHub (Oct 16, 2023):
Yes I did.
@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.
@mnadareski commented on GitHub (Oct 26, 2023):
Fixed by https://github.com/SabreTools/MPF/pull/589