From 3e4a3dcb23d849fa0ce5f5009e83606abaef15aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Sat, 8 Dec 2012 14:21:51 -0500 Subject: Ignore .nfs* files in distutils (#7719). These files are created by some NFS clients a file is edited and removed concurrently (see added link in doc for more info). If such a file is removed between distutils calls listdir and copy, it will get confused. Other special files are ignored in sdist (namely VCS directories), but this has to be filtered out earlier. --- Lib/distutils/dir_util.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lib/distutils/dir_util.py') diff --git a/Lib/distutils/dir_util.py b/Lib/distutils/dir_util.py index 30daf49a6e..2826ff805d 100644 --- a/Lib/distutils/dir_util.py +++ b/Lib/distutils/dir_util.py @@ -141,6 +141,10 @@ def copy_tree(src, dst, preserve_mode=1, preserve_times=1, src_name = os.path.join(src, n) dst_name = os.path.join(dst, n) + if n.startswith('.nfs'): + # skip NFS rename files + continue + if preserve_symlinks and os.path.islink(src_name): link_dest = os.readlink(src_name) if verbose >= 1: -- cgit v1.2.1