TrimUI: guard samefile() against missing target on first port install#329
TrimUI: guard samefile() against missing target on first port install#329Pobega wants to merge 1 commit into
Conversation
os.path.samefile() stats both paths passed to it; on first-time port installs the 'target' may not yet exist, resulting in a FileNotFoundError which aborts the installation. Short-circuit this check by checking that the target exists before executing the os.path.samefile() comparison. If the target doesn't exist then we flow directly into the code below (as if the samefile check failed.)
|
We abandonded support of Tina-linux based CFW due to a huge pile of other issues, and the fact that knulli and muOS became available on a133p systems. I don't see a problem with merging this, but you're fighting a losing battle here unless you intend to continue working to fix the huge array of missing libraries and system utilities we depend on. |
|
I'm already fighting a losing battle; ben16w/minui-portmaster#137 The question is whether it's accepted upstream or I maintain it as a patch. I figured in this case it's an actual flaw with the logic, so may as well upstream it. I also never specified that this was a Tina Linux issue, it seemed to me like a flaw in the logic here -- it makes sense to guard this for anyone using it that may run into this same crash. |
os.path.samefile()stats both paths passed to it; on first-time port installs thetargetmay not yet exist, resulting in aFileNotFoundErrorwhich aborts the installation.Short-circuit this check by checking that the
targetexists before executing theos.path.samefile()comparison. If the target doesn't exist then we flow directly into the code below (as if thesamefilecheck failed.)