* morituri/extern/task/gstreamer.py:
* morituri/test/test_common_checksum.py: Protect backslashes in names. Fixes #89.
This commit is contained in:
@@ -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:
|
||||
|
||||
6
morituri/extern/task/gstreamer.py
vendored
6
morituri/extern/task/gstreamer.py
vendored
@@ -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):
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user