summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/FilenameMapping.py
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2009-01-03 18:38:59 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2009-01-03 18:38:59 +0000
commit0dbb9698b0d1441a91598993bf9aa5430003e6c8 (patch)
tree575e0c2750489062bd6e7c5f25b1ecdf9aa70523 /rdiff-backup/rdiff_backup/FilenameMapping.py
parent7c001fc6677f6aa64dc9b62072fc3f8e77a6c6cf (diff)
downloadrdiff-backup-0dbb9698b0d1441a91598993bf9aa5430003e6c8.tar.gz
First pass at fixing escape DOS devices and trailing spaces/periods.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@991 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