summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-07-11 19:18:46 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-07-11 19:18:46 +0000
commit9eac1971803bc3e17ab1a13e4d825774290e0ef4 (patch)
tree6155800de6f49b8a40d48be3f08fce19b86efb98
parent15ace9d219b598998772c4df1657055bd6650a70 (diff)
downloadrdiff-backup-9eac1971803bc3e17ab1a13e4d825774290e0ef4.tar.gz
Technically, lpt[3-9] should also be quoted (see sys/fs/vfat/namei.c in
Linux kernel) git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@821 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/rdiff_backup/FilenameMapping.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rdiff-backup/rdiff_backup/FilenameMapping.py b/rdiff-backup/rdiff_backup/FilenameMapping.py
index cecf76c..1f16262 100644
--- a/rdiff-backup/rdiff_backup/FilenameMapping.py
+++ b/rdiff-backup/rdiff_backup/FilenameMapping.py
@@ -88,9 +88,9 @@ def quote(path):
return QuotedPath
# Escape first char of any special DOS device files even if filename has an
- # extension. Special names are: aux, prn, con, nul, com0-9, and lpt1-2.
+ # extension. Special names are: aux, prn, con, nul, com0-9, and lpt1-9.
if not re.search(r"^aux(\..*)*$|^prn(\..*)*$|^con(\..*)*$|^nul(\..*)*$|" \
- r"^com[0-9](\..*)*$|^lpt[12]{1}(\..*)*$", QuotedPath, \
+ r"^com[0-9](\..*)*$|^lpt[1-9]{1}(\..*)*$", QuotedPath, \
re.I):
return QuotedPath
return "%s%03d" % (quoting_char, ord(QuotedPath[0])) + QuotedPath[1:]