A few apps are using some custom code for PAL (contained in Custom.nsh) I wrote to determine the PortableApps.com Documents directory when apps are run without the PA.c Platform. There is a bug in this code that I fixed today in the LibreOffice Portable 4.2.1 update (awaiting publisher posting). Here is the fixed code:
ExpandEnvStrings $1 "%PortableApps.comDocuments%" ${If} $1 == "" ${OrIfNot} ${FileExists} "$1\*.*" ${GetParent} $EXEDIR $3 ${GetParent} $3 $1 ${If} $1 == "" ;Be sure we didn't just GetParent on Root StrCpy $1 $3 ${EndIf} ${If} ${FileExists} "$1\Documents\*.*" StrCpy $2 "$1\Documents" ${Else} ${GetRoot} $EXEDIR $1 ${If} ${FileExists} "$1\Documents\*.*" StrCpy $2 "$1\Documents" ${Else} StrCpy $2 "$1" ${EndIf} ${EndIf} System::Call 'Kernel32::SetEnvironmentVariable(t, t) i("PortableApps.comDocuments", "$2").r0' ${EndIf}
WHAT'S FIXED: The fix is specifically around when an app is run at the root of the drive (example: X:\AppNamePortable instead of X:\SomePathTo\AppNamePortable) which was causing an invalid path to result when GetParent is called on a variable with the root directory.
AFFECTED APPS: LibreOffice (fixed with the 4.2.1 release), LibreCad, Mp3splt, MPC-HC, PDF-XChangeViewer (dev test), possibly other Dev Test apps.
I've already updated the affected released apps internally and will have them updated with the fix with their next releases. I wanted to post this publicly so other devs can fix any dev test releases with this change.
As an add-on to the above, here's full custom code to interpolate all 4 custom folders (Documents, Videos, Pictures, Music) if they don't exist in their standard location:
Sometimes, the impossible can become possible, if you're awesome!
Given the above, I presume there's nothing for me to do here?
It should be "prapped" btw