summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/FilenameMapping.py
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2009-01-03 21:32:40 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2009-01-03 21:32:40 +0000
commite389196e3426dde8957d38b4da8135489f80ae6a (patch)
tree3587f866840f836a45cce53ae8d62cc52cc63179 /rdiff-backup/rdiff_backup/FilenameMapping.py
parent7976fa4fe271017ae13f897968306cdd7d1641ea (diff)
downloadrdiff-backup-e389196e3426dde8957d38b4da8135489f80ae6a.tar.gz
Properly fix escaping DOS devices and trailing periods and spaces; now supports
native Windows and Linxu/FAT32. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@993 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/FilenameMapping.py')
-rw-r--r--rdiff-backup/rdiff_backup/FilenameMapping.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/rdiff-backup/rdiff_backup/FilenameMapping.py b/rdiff-backup/rdiff_backup/FilenameMapping.py
index 8bb3951..046a4be 100644
--- a/rdiff-backup/rdiff_backup/FilenameMapping.py
+++ b/rdiff-backup/rdiff_backup/FilenameMapping.py
@@ -85,18 +85,17 @@ def quote(path):
"""
QuotedPath = chars_to_quote_regexp.sub(quote_single, path)
- if not Globals.must_escape_dos_devices \
- and not Globals.must_escape_trailing_spaces:
+ if not Globals.escape_dos_devices and not Globals.escape_trailing_spaces:
return QuotedPath
# Escape a trailing space or period (invalid in names on FAT32 under DOS,
# Windows and modern Linux)
- if Globals.must_escape_trailing_spaces:
+ if Globals.escape_trailing_spaces:
if len(QuotedPath) and (QuotedPath[-1] == ' ' or QuotedPath[-1] == '.'):
QuotedPath = QuotedPath[:-1] + \
"%s%03d" % (quoting_char, ord(QuotedPath[-1]))
- if not Globals.must_escape_dos_devices:
+ if not Globals.escape_dos_devices:
return QuotedPath
# Escape first char of any special DOS device files even if filename has an