I was just testing https://portableapps.com/node/38992 which moves the user folder to app folder on launch. For some reason, the Data\user directory is currently locked and can't be deleted/moved/renamed. The result was that an empty App\SciTE\user directory was created, then when the app ran, it put some default files in that directory.
My issue is that when the app was closed, it replaced the contents of the Data\user directory with the files from the App\SciTE\user directory. In other words; it erased all my files from the Data\user directory and replaced it with defaults that this specific app creates.
If the launcher fails on [DirectoriesMove] at launch, I don't think it should attempt to move the directory back on close. Or, improve the test if the directory exists, because it failed in my case (the directory existed, with files in it, but couldn't be moved).
here are the relevant log lines:
(I compiled a new launcher with debug enabled when testing this)
DirectoriesMove/PrePrimary (line 210.12.2.2.17.27): Environment variable expansion on $1: Before: `%PAL:AppDir%\SciTE\user` After: `E:\PortableApps\PortableApps\_SciTE4AutoHotkeyPortable\App\SciTE\user` DirectoriesMove/PrePrimary (line 210.12.59.27): Renaming directory E:\PortableApps\PortableApps\_SciTE4AutoHotkeyPortable\Data\user to E:\PortableApps\PortableApps\_SciTE4AutoHotkeyPortable\App\SciTE\user DirectoriesMove/PrePrimary (line 210.12.74.27): E:\PortableApps\PortableApps\_SciTE4AutoHotkeyPortable\Data\user\*.* does not exist, so not copying it to E:\PortableApps\PortableApps\_SciTE4AutoHotkeyPortable\App\SciTE\user. (Note for developers: if you want default data, remember to put files in App\DefaultData\user) Global (line 254.27): About to execute the following string and wait till it's done: "E:\PortableApps\PortableApps\_SciTE4AutoHotkeyPortable\App\SciTE\SciTE.exe"
You may wish to place the comment there?
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss
I believe this issue would affect any app that uses DirectoriesMove in it's launcher, when the directory to be moved is locked. I mentioned the app I was using to test the issue just to add context to the discussion and allow users to replicate my exact test, if they choose to.