summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-23 06:06:47 +0100
committerhut <hut@lavabit.com>2010-01-23 06:06:47 +0100
commitf601af14dff59355f678a51a2e257d1e376b74f5 (patch)
treeba8ae3448f870baf0ab79826e347e493405fa9f5
parentc834433a342d2c55bae823d59602be06d80ae4f4 (diff)
downloadranger-f601af14dff59355f678a51a2e257d1e376b74f5.tar.gz
fixed handling of spaces in filenames when using "open with: self"
-rw-r--r--ranger/applications.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ranger/applications.py b/ranger/applications.py
index e5a5fc4e..736f562e 100644
--- a/ranger/applications.py
+++ b/ranger/applications.py
@@ -19,6 +19,7 @@ This module faciliates starting of new processes.
 import os, sys
 from ranger.ext.waitpid_no_intr import waitpid_no_intr
 from subprocess import Popen, PIPE
+from ranger.ext.shell_escape import shell_escape
 from ranger.ext.iter_tools import flatten
 from ranger.shared import FileManagerAware
 
@@ -196,7 +197,11 @@ class AppContext(object):
 
 		app = apps.get(self.app)
 		self.action = app(self)
-		self.shell = isinstance(self.action, str)
+		if isinstance(self.action, str):
+			self.shell = True
+			self.action = shell_escape(self.action)
+		else:
+			self.shell = False
 	
 	def run(self):
 		"""