[kupfer: 5/7] plugin.truecrypt: fix rank and strings



commit 8260c6d769bfafca848c172029a4ef4e6eb2e519
Author: Karol BÄ?dkowski <karol bedkowsk+gh gmail com>
Date:   Fri Dec 11 13:07:01 2009 +0100

    plugin.truecrypt: fix rank and strings

 kupfer/plugin/truecrypt.py |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/kupfer/plugin/truecrypt.py b/kupfer/plugin/truecrypt.py
index 7dbacfe..8efcc2a 100644
--- a/kupfer/plugin/truecrypt.py
+++ b/kupfer/plugin/truecrypt.py
@@ -20,7 +20,11 @@ _HISTORY_FILE = "~/.TrueCrypt/History.xml"
 
 
 def mount_volume_in_truecrypt(filepath):
-	''' Mount file in Truecrypt. '''
+	''' Mount file in Truecrypt. 
+		Escape apostrophes - ie:
+		"test'dk 'dlk' dsl''k '' sdkl.test" ->
+		"'test'\''dk '\''dlk'\'' dsl'\'''\''k '\'''\'' sdkl.test'"
+	'''
 	# escape ' characters
 	filepath = filepath.replace("'", "'\\''")
 	utils.launch_commandline("truecrypt '%s'" % filepath)
@@ -50,8 +54,8 @@ class MountVolume(Action):
 
 
 class MountFile(Action):
-	''' Mount selected file in trukecrypt. '''
-	rank_adjust = -2
+	''' Mount selected file in truecrypt. '''
+	rank_adjust = -10
 
 	def __init__(self):
 		Action.__init__(self, _("Mount File in Truecrypt"))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]