REPRO:
- Create directory structure ?:\dir1\dir2\dir3
- Install NotepadPlusPlusPortable_6.3.3_Rev_2.paf.exe into ?:\dir1\dir2\Notepad++Portable
- Open Notepad++Portable & open Data\settings\Notepad++PortableSettings.ini in Notepad++Portable
- Close Notepad++Portable
- Open Notepad++Portable again, Notepad++PortableSettings.ini will still be loaded, so MRU is OK
- Move the Notepad++Portable directory either up to dir1 or down to dir3 & open Notepad++Portable. Notepad++PortableSettings.ini is not loaded as path replacement is broken
I haven't found a problem when the drive letter is also changed but I haven't tested every possible scenario either.
SUMMARY:
Moving the app up or down the folder tree on the same drive results in an incorrect path being written.
That wouldn't be base. That would be LastPackagePartialDir which gets replaced before LastPortableAppsBaseDir and affects the paths from the directory the Notepad++Portable.exe launcher is in and sub-directories thereof. Did you look at your Notepad++PortableSettings.ini before and after to ensure the LastDirectory was correct?
Sometimes, the impossible can become possible, if you're awesome!
Removing the PortableAppsBaseDirectory [FileWriteN] section in the launcher solves the problem though.
All paths in Notepad++PortableSettings.ini are still correct but the paths in the files written are not. The first & last sections are either missing or duplicated.
The first entry corrects the issue. But the second one breaks it.
This is likely a WONTFIX. The purpose of this is to be able to move an app between drives or between PCs within a cloud synced directory (DropBox, etc), not to randomly move apps up and down directories.
Sometimes, the impossible can become possible, if you're awesome!
OK, I got the impression that's what lots of people did (randomly move apps up and down directories)
What's the actual use case to do so is the question? Having it work for drive letters makes a lot of sense so you can move it on a stick between PCs (that's what portable apps were originally about). Having it work when you move an app from one drive to another makes sense (as some people like being able to upgrade from one to another). Having it work as the whole path changes makes sense (cloud drives when synced between PCs do this). But moving just the app up or down directory trees?
On the technical side, the 3 replaces are to handle the 3 use cases listed above. The partial package and drive letter were the two original ones. Base path was introduce for situations where you wanted links to stuff outside your directory to remain intact where the relative path to it changed.
Note that it will work properly if you change the actual base path itself from one thing to another (changing, say, C:\PortableApps to C:\Portable Apps).
We may be able to address this edge case when we incorporate all 3 replaces into a single replace, detecting this situation and skipping one of the replaces.
Sometimes, the impossible can become possible, if you're awesome!
I have no idea As I said, "I got the impression". Personally, I keep all my apps in the standard directory & only the drive letter changes but I do test the directories move functionality & a bug is a bug