Show More
@@ -445,10 +445,10 b' def copyfiles(src, dst, hardlink=None):' | |||
|
445 | 445 | |
|
446 | 446 | return hardlink, num |
|
447 | 447 | |
|
448 |
_win |
|
|
448 | _winreservednames = '''con prn aux nul | |
|
449 | 449 | com1 com2 com3 com4 com5 com6 com7 com8 com9 |
|
450 | 450 | lpt1 lpt2 lpt3 lpt4 lpt5 lpt6 lpt7 lpt8 lpt9'''.split() |
|
451 |
_win |
|
|
451 | _winreservedchars = ':*?"<>|' | |
|
452 | 452 | def checkwinfilename(path): |
|
453 | 453 | '''Check that the base-relative path is a valid filename on Windows. |
|
454 | 454 | Returns None if the path is ok, or a UI string describing the problem. |
@@ -472,14 +472,14 b' def checkwinfilename(path):' | |||
|
472 | 472 | if not n: |
|
473 | 473 | continue |
|
474 | 474 | for c in n: |
|
475 |
if c in _win |
|
|
475 | if c in _winreservedchars: | |
|
476 | 476 | return _("filename contains '%s', which is reserved " |
|
477 | 477 | "on Windows") % c |
|
478 | 478 | if ord(c) <= 31: |
|
479 | 479 | return _("filename contains %r, which is invalid " |
|
480 | 480 | "on Windows") % c |
|
481 | 481 | base = n.split('.')[0] |
|
482 |
if base and base.lower() in _win |
|
|
482 | if base and base.lower() in _winreservednames: | |
|
483 | 483 | return _("filename contains '%s', which is reserved " |
|
484 | 484 | "on Windows") % base |
|
485 | 485 | t = n[-1] |
General Comments 0
You need to be logged in to leave comments.
Login now