-config switch requires relative path

Found a bug in "Everything"? report it here
Post Reply
DaveZobel
Posts: 1
Joined: Tue Dec 22, 2009 10:38 pm

-config switch requires relative path

Post by DaveZobel »

The "-config" command-line switch expects the .ini file path to be relative (to the installation folder of Everything.exe). It fails if an absolute path (with or without drive specifier) is given.

Workaround: Use a relative path. Note that this workaround can only be used if the .ini file is on the same drive as the Everything installation folder.

To replicate:

1. Install Everything. Launch it (so that Everything.ini is created) and exit.
2. Copy Everything.ini from the Everything installation folder to some other folder on the same drive (e.g., C:\foo\). Open the copy for editing, change a few of its settings manually, and save.
3. Launch Everything, giving the absolute path of the modified .ini file:
{Everything installation folder}\Everything.exe -startup -config "C:\foo\Everything.ini"
4. Go to "Tools | Options". Note that the settings do not reflect the manual changes made in step 2.
5. Open the file {Everything installation folder}\Errorlog.txt . Note that an error message is given, similar to:
... mu::CreateFileUTF8(): CreateFileW(): GetLastError(): 123: Failed to open file C:\Programs\Everything\C:\foo\Everything.ini
; i.e., the full "-config" path has been appended to the absolute path of the Everything installation folder.
6. Exit Everything.
7. Launch Everything, giving the relative path of the modified .ini file:
{Everything installation folder}\Everything.exe -startup -config "..\..\foo\Everything.ini"
where there are at least as many repetitions of "..\" as there are folder components in the absolute path of the Everything installation folder (that is, this relative path navigates from the Everything installation folder to the root of the drive and then to the folder containing the modified .ini file).
8. Go to "Tools | Options". Note that the settings now DO reflect the manual changes made in step 2.
9. Make some changes to the settings. Exit Everything, open the copied .ini file for editing, and observe that the settings have been updated accordingly.
therube
Posts: 4985
Joined: Thu Sep 03, 2009 6:48 pm

Re: -config switch requires relative path

Post by therube »

Just came across this (from WinSCP), & maybe something similar would be appropriate for Everything?
- Environment variable WINSCP_PATH pointing to path, where WinSCP executable file is located, is set on startup, so it can be used to configure portable paths relative to the WinSCP executable file.
void
Developer
Posts: 16771
Joined: Fri Oct 16, 2009 11:31 pm

Re: -config switch requires relative path

Post by void »

Absolute paths for the -config command line option has been fixed for the next release of "Everything".
Post Reply