From f5e30686d1fb68a52dd89aee32b9a1d1f1d8706b Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Fri, 18 May 2018 19:52:50 +0000 Subject: [PATCH] put in fixes for hidden .nfs files --- files/scripts/create-filelist | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/files/scripts/create-filelist b/files/scripts/create-filelist index d0bd9d9cdb..89fb32bd0c 100755 --- a/files/scripts/create-filelist +++ b/files/scripts/create-filelist @@ -88,12 +88,20 @@ def recursedir(path='.', skip=[], alwaysskip=['.~tmp~'], in_restricted=False): continue if dentry.name in alwaysskip: continue + if dentry.name.startswith('.nfs'): + continue # Skip things which are not at least group readable # Symlinks are followed here so that clients won't see dangling # symlinks to content they can't transfer. It's the default, but to # 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)) continue