mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
OK, here's a different way to implement the same thing -- this version
also supports filenames with multiple spaces in their name :-)
This commit is contained in:
parent
aeeda5b276
commit
1f05cb007a
1 changed files with 6 additions and 6 deletions
|
@ -132,17 +132,17 @@ def mirrorsubdir(f, localdir):
|
||||||
infostuff = ''
|
infostuff = ''
|
||||||
else:
|
else:
|
||||||
# Parse, assuming a UNIX listing
|
# Parse, assuming a UNIX listing
|
||||||
words = string.split(line)
|
words = string.split(line, None, 8)
|
||||||
if len(words) < 6:
|
if len(words) < 6:
|
||||||
if verbose > 1: print 'Skipping short line'
|
if verbose > 1: print 'Skipping short line'
|
||||||
continue
|
continue
|
||||||
if words[-2] == '->':
|
filename = words[-1]
|
||||||
|
if string.find(filename, " -> ") >= 0:
|
||||||
if verbose > 1:
|
if verbose > 1:
|
||||||
print 'Skipping symbolic link %s -> %s' % \
|
print 'Skipping symbolic link %s' % \
|
||||||
(words[-3], words[-1])
|
filename
|
||||||
continue
|
continue
|
||||||
filename = string.join(words[8:])
|
infostuff = words[-5:-1]
|
||||||
infostuff = words[5:]
|
|
||||||
mode = words[0]
|
mode = words[0]
|
||||||
skip = 0
|
skip = 0
|
||||||
for pat in skippats:
|
for pat in skippats:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue