Good day! xarchiver is started by clicking "Extract to..." context menu item. But present working directory is the home directory for xarchiver in this case. I've taken it from an experiment. And this this uncomfortable: point "." in the extract dialog extracts archive to the home directory. Let's change this behavior? Thanks!
Would be ok for me to change the default to current directory, instead of $HOME It's the same for file-roller, so I guess the directory is passed by the archive-plugin ( or none is passed and $HOME is the default ) Like always, patches are welcome !
Well I'm far from Thunar's ode and have environment for 0.3.1 version plugin only... But ok :) Take a look, please!
Created attachment 8047 Proposed patch for 0.3.1
Thanks alot for the patch, works fine here ! On master I had to throw out the extra part for thunarx 0,4,1 to get it compiled (against thunarx-3 )
Created attachment 8050 patch for master Repo looks like it is not forseen to release a 0.3.2. All tags are directly on master, which is already at 0.4.0, using thunarx-3 API. So I would just push it to master, will than work together with thunar 1.8.x
Created attachment 8051 patch for master fixed author
Sorry, false positive .. looks like it as well works fine for me without your fix for xarchiver :P Possibly you are using a different xarchiver.tap ? I am using the one from here: https://github.com/ib/xarchiver/blob/master/xarchiver.tap Usually it should be installed together with xarchiver (that was not the case for me) Try "locate xarchiver.tap" to figure out where it is installed on your system. For me it is installed here: /usr/local/libexec/thunar-archive-plugin Funny thing is, for file-roller you patch works well :P And for some weird reason, it does not help to replace $(folder) with $(pwd) in the file-roller.tap ... need to do some more investigation
It's not about xarchiver only. According to this line (https://github.com/xfce-mirror/thunar-archive-plugin/blob/e5aeedbb7417f822b914bbd0714f636df6db7d3b/thunar-archive-plugin/tap-provider.c#L319): default_dir = g_get_home_dir (); So, current directory (pwd) in *every* tap script (we consider "Extract to" operation) will be $HOME. I don't see a possibility why it works for you. (BTW I also thought that it's a tap-script error. Then found that line.) Note we talk about "Extract to". "Extract here" has another situation, see code an the neighbor function.
Created attachment 8061 patch for master Ok, thanks fot that hint. Actually it worked for my xarchiver, because the tap script I use does not use $pwd or $folder for "extarct to". Looks like xarchiver automatically used the current directory as default. ( as well file-roller does, but thats not a behaviour we should rely on) There seems to be a second problem: $pwd is used in some tap scripts. But actually it does not have a value at all ! (You can just echo it in the script) ( for some strange reason "echo $PWD" prints the $HOME path ) This leads to unwanted effects ... xarchiver/file-roller will default to $HOME when "--extract-to" is used with empty argument. So I will as well rename the variables in the tab-files: $folder --> $pwd (so the non working old $pwd can stay where it is ) I modified your patch further: - Use the simplified code from 'tap_create_archive' --> no indentation - rename $folder to $pwd in all tab-files I tested all related scripts, the all now work fine for me.
Ok, thanks!
Alexander Schwinn referenced this bugreport in commit 5a63c61a2a2bcb18b59e610fa036ae092e08adc1 Start archive application from file's directory (Bug #14773) https://git.xfce.org/thunar-plugins/thunar-archive-plugin/commit?id=5a63c61a2a2bcb18b59e610fa036ae092e08adc1
Finally pushed the patch, will be released in v0.4.1 Thanks as well for your contribution !