From e389196e3426dde8957d38b4da8135489f80ae6a Mon Sep 17 00:00:00 2001 From: owsla Date: Sat, 3 Jan 2009 21:32:40 +0000 Subject: 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 --- rdiff-backup/rdiff_backup/FilenameMapping.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'rdiff-backup/rdiff_backup/FilenameMapping.py') 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 -- cgit v1.2.1