You are here

[Closed] PAL $PortableAppsBaseDirectory path replace

7 posts / 0 new
Last post
prapper
Offline
Last seen: 3 years 9 months ago
Developer
Joined: 2008-01-24 17:01
[Closed] PAL $PortableAppsBaseDirectory path replace

REPRO:

  1. Create directory structure ?:\dir1\dir2\dir3
  2. Install NotepadPlusPlusPortable_6.3.3_Rev_2.paf.exe into ?:\dir1\dir2\Notepad++Portable
  3. Open Notepad++Portable & open Data\settings\Notepad++PortableSettings.ini in Notepad++Portable
  4. Close Notepad++Portable
  5. Open Notepad++Portable again, Notepad++PortableSettings.ini will still be loaded, so MRU is OK
  6. 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.

John T. Haller
John T. Haller's picture
Online
Last seen: 48 min 58 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Not Base

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!

prapper
Offline
Last seen: 3 years 9 months ago
Developer
Joined: 2008-01-24 17:01
Removing the

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.

John T. Haller
John T. Haller's picture
Online
Last seen: 48 min 58 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Ah Ok

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!

prapper
Offline
Last seen: 3 years 9 months ago
Developer
Joined: 2008-01-24 17:01
OK, I got the impression

OK, I got the impression that's what lots of people did (randomly move apps up and down directories) Smile

John T. Haller
John T. Haller's picture
Online
Last seen: 48 min 58 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Why?

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!

prapper
Offline
Last seen: 3 years 9 months ago
Developer
Joined: 2008-01-24 17:01
I have no idea

I have no idea Smile 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 Smile

Log in or register to post comments