* morituri/extern/task/gstreamer.py:

* morituri/test/test_common_checksum.py:
	  Protect backslashes in names.  Fixes #89.
This commit is contained in:
Thomas Vander Stichele
2012-08-12 18:25:03 +00:00
parent 1da3c8cdfb
commit f0c66013e3
3 changed files with 14 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
2012-08-12 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/extern/task/gstreamer.py:
* morituri/test/test_common_checksum.py:
Protect backslashes in names. Fixes #89.
2012-08-12 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/common/drive.py:

View File

@@ -26,10 +26,10 @@ def quoteParse(path):
"""
Quote a path for use in gst.parse_launch.
"""
# Make sure double quotes are escaped. See
# morituri.test.test_common_checksum
# Make sure double quotes and backslashes are escaped. See
# morituri.test.test_common_checksum.NormalPathTestCase
return path.replace('"', '\\"')
return path.replace('"', '\\"').replace('\\', '\\\\')
class GstException(Exception):

View File

@@ -51,3 +51,8 @@ class NormalPathTestCase(PathTestCase):
# This test makes sure we can checksum files with double quote in
# their name
self._testSuffix(u'morituri.test.12" edit')
def testBackSlash(self):
# This test makes sure we can checksum files with a backslash in
# their name
self._testSuffix(u'morituri.test.40 Years Back\\Come')