Page 1 of 1

"Save selection" from "Edit" destroys relative paths

Posted: 05.09.2017, 19:58
by afh
I don't know if FreeCommander is committed to support relative paths in settings, but I use them as much as possible.
The idea is to have a completely portable environment, so I use relative paths whenever possible in FreeCommander: when I define a button in a favorite toolbar, when I define a default program, editor or viewer in "Settings" -> "Programs", etc...

Unfortunately, different versions mess up these relative paths constantly...in apparently random situations...
The last situation I encountered is when I "Save selection" (from "Edit" menu) from a folder, FreeCommander adds the folder where I save the ".sel" file in the relative path I defined in settings:
for example, if I define a default editor "..\editor.exe" and I save a selection file in "D:\" drive, then the editor path become "D:\editor.exe", even if the FreeCommander is put on "C:\"...
Version used: at least from 752...


It would be really nice if the developer will pay attention to the "portability" of the settings.
It's really nice to put all your portable programs in a folder and create a portable working environment via FreeCommander. After that, you just copy a folder and you have everything settled...

Re: "Save selection" from "Edit" destroys relative paths

Posted: 20.09.2017, 21:24
by Marek
The last situation I encountered is when I "Save selection" (from "Edit" menu) from a folder, FreeCommander adds the folder where I save the ".sel" file in the relative path I defined in settings:
for example, if I define a default editor "..\editor.exe" and I save a selection file in "D:\" drive, then the editor path become "D:\editor.exe", even if the FreeCommander is put on "C:\"...
Sorry but from your description I do not know what you mean.

Re: "Save selection" from "Edit" destroys relative paths

Posted: 20.09.2017, 22:15
by Dreamer
You can use %FcSrcDrive% or %FcSrcPath% - I tested with editors and it works, more here:

http://www.freecommander.com/fchelpxe/e ... older.html

Re: "Save selection" from "Edit" destroys relative paths

Posted: 18.10.2017, 21:28
by afh
Dreamer wrote: 20.09.2017, 22:15 You can use %FcSrcDrive% or %FcSrcPath% - I tested with editors and it works, more here:

http://www.freecommander.com/fchelpxe/e ... older.html
You are right!!! I don't know why I didn't try this... :oops:

So instead of "..\editor.exe" I should have used"%FcSrcPath% \..\editor.exe"

I will change all my relative paths to see if the problem comes back...

Thanks a lot!
_______________________________
later edit

There is one difference: when I use a relative path with "%FcSrcPath% \" in a button (compared to "..\") -> the button won't display an icon if the path is not an ".exe".
But this is ok! I can put an icon myself. And of course I will define my path to icon with "%FcSrcPath% \........." :mrgreen:
All my problems are solved now... 8)

Re: "Save selection" from "Edit" destroys relative paths

Posted: 08.09.2018, 18:07
by afh
afh wrote: 18.10.2017, 21:28 So instead of "..\editor.exe" I should have used"%FcSrcPath% \..\editor.exe"
Relative paths with %FcSrcPath% seem to work everywhere, except for items in "Favorite items" (CTRL+SHIFT+F) which are displayed in "Favorites tree" (ALT+F).

If I put a folder with a relative path constructed with %FcSrcPath% , that folder will be displayed, but from there the navigation gets stucked when I want to go in subfolders (the address bar is showing the path with dots, so not resolved).

Could this be solved in a future version? Thanks!