summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2013-03-05 21:01:46 +0100
committerhut <hut@lavabit.com>2013-03-05 21:01:46 +0100
commitf7811dd4901a282bca4af9bb1b61e16ce8a6c35d (patch)
tree4b0f521f3b1c221c151ef2534cdc1561e2e3373f /ranger
parent50f6b42565ebbf957179acbcdbc5ef1d553a9705 (diff)
downloadranger-f7811dd4901a282bca4af9bb1b61e16ce8a6c35d.tar.gz
core.fm: use "basename" instead of "path" in sxiv hook
This allows to pass more arguments before the argument list gets too
long.
Diffstat (limited to 'ranger')
-rw-r--r--ranger/core/fm.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/core/fm.py b/ranger/core/fm.py
index d6d830f6..3bac283e 100644
--- a/ranger/core/fm.py
+++ b/ranger/core/fm.py
@@ -124,9 +124,9 @@ class FM(Actions, SignalDispatcher):
         def sxiv_workaround_hook(command):
             if self.settings.sxiv_opens_all_files and command[0:5] == "sxiv "\
                     and len(self.thisdir.marked_items) == 0:
-                images = [f.path for f in self.thisdir.files if f.image]
-                if images and self.thisfile.path in images:
-                    number = images.index(self.thisfile.path) + 1
+                images = [f.basename for f in self.thisdir.files if f.image]
+                if images and self.thisfile.basename in images:
+                    number = images.index(self.thisfile.basename) + 1
                     escaped_filenames = "' '".join(f.replace("'",
                         "'\\\''") for f in images if "\x00" not in f)
                     command = "set -- '%s'; %s" % (escaped_filenames,