mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									09974b4e9e
								
							
						
					
					
						commit
						3e4a3dcb23
					
				
					 5 changed files with 33 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -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:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue