put in fixes for hidden .nfs files
This commit is contained in:
parent
6246c6b511
commit
f5e30686d1
1 changed files with 9 additions and 1 deletions
|
@ -88,12 +88,20 @@ def recursedir(path='.', skip=[], alwaysskip=['.~tmp~'], in_restricted=False):
|
||||||
continue
|
continue
|
||||||
if dentry.name in alwaysskip:
|
if dentry.name in alwaysskip:
|
||||||
continue
|
continue
|
||||||
|
if dentry.name.startswith('.nfs'):
|
||||||
|
continue
|
||||||
|
|
||||||
# Skip things which are not at least group readable
|
# Skip things which are not at least group readable
|
||||||
# Symlinks are followed here so that clients won't see dangling
|
# Symlinks are followed here so that clients won't see dangling
|
||||||
# symlinks to content they can't transfer. It's the default, but to
|
# symlinks to content they can't transfer. It's the default, but to
|
||||||
# avoid confusion it's been made explicit.
|
# avoid confusion it's been made explicit.
|
||||||
if not (dentry.stat(follow_symlinks=True).st_mode & stat.S_IRGRP):
|
try:
|
||||||
|
s = dentry.stat(follow_symlinks=True)
|
||||||
|
except os.error:
|
||||||
|
print('Could not stat {0}. Dangling symlink?'.format(dentry.name), file=sys.stderr)
|
||||||
|
continue
|
||||||
|
|
||||||
|
if not (s.st_mode & stat.S_IRGRP):
|
||||||
# print('{} is not group readable; skipping.'.format(dentry.path))
|
# print('{} is not group readable; skipping.'.format(dentry.path))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue