Commit c5b4d0cd authored by owsla's avatar owsla

Revert previous patch & hold it for the new development branch


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@992 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent e73f5576
New in v1.2.5 (????/??/??)
---------------------------
Fix escape DOS devices and escape trailing spaces/periods. (Andrew Ferguson)
New in v1.2.4 (2009/01/01)
......
......@@ -85,17 +85,18 @@ def quote(path):
"""
QuotedPath = chars_to_quote_regexp.sub(quote_single, path)
if not Globals.escape_dos_devices and not Globals.escape_trailing_spaces:
if not Globals.must_escape_dos_devices \
and not Globals.must_escape_trailing_spaces:
return QuotedPath
# Escape a trailing space or period (invalid in names on FAT32 under DOS,
# Windows and modern Linux)
if Globals.escape_trailing_spaces:
if Globals.must_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.escape_dos_devices:
if not Globals.must_escape_dos_devices:
return QuotedPath
# Escape first char of any special DOS device files even if filename has an
......
......@@ -860,8 +860,7 @@ def checkdest_need_check(dest_rp):
"""Return None if no dest dir found, 1 if dest dir needs check, 0 o/w"""
if not dest_rp.isdir() or not Globals.rbdir.isdir(): return None
for filename in Globals.rbdir.listdir():
if filename not in ['chars_to_quote', 'special_escapes',
'backup.log']: break
if filename not in ['chars_to_quote', 'backup.log']: break
else: # This may happen the first backup just after we test for quoting
return None
curmirroot = Globals.rbdir.append("current_mirror")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment