phillbush/xfiles

contextcmd is not run with absolute path of file

apprehensions opened this issue · 3 comments

title.
for example, xfilesctl can run with file .profile as an argument, but that won't work due to PWD. is this intentional because xfilesctl will be spawned in the pwd of the xfiles gui?

is this intentional because xfilesctl will be spawned in the pwd of the xfiles gui?

Yeah, xfilesctl is spawned with its current working directory as the directory where the selected files are at.
So there's no need to give the absolute paths, as they are already relative to where the script is invoked.

That was done in this commit.

If you want the absolute paths in the script, you can prefix the arguments with $PWD.
(Or the commit can be reverted, if proved necessary to have the absolute paths instead).

it 100% should be absolute paths instead, this can be unsafe..

Done.