mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Patch from Corran Webster <cwebster@nevada.edu> (tweaked for style by me):
changed 'copy_file()' to use the native Mac file copy routine.
This commit is contained in:
		
							parent
							
								
									0eff87a570
								
							
						
					
					
						commit
						911d86693b
					
				
					 1 changed files with 11 additions and 0 deletions
				
			
		|  | @ -280,6 +280,17 @@ def copy_file (src, dst, | ||||||
|     if dry_run: |     if dry_run: | ||||||
|         return 1 |         return 1 | ||||||
| 
 | 
 | ||||||
|  |     # On a Mac, use the native file copy routine | ||||||
|  |     if os.name == 'mac': | ||||||
|  |         import macostools | ||||||
|  |         try: | ||||||
|  |             macostools.copy (src, dst, 0, preserve_times) | ||||||
|  |         except OSError, exc: | ||||||
|  |             raise DistutilsFileError, \ | ||||||
|  |                   "could not copy '%s' to '%s': %s" % (src, dst, exc[-1]) | ||||||
|  |         return 1 | ||||||
|  |      | ||||||
|  |     # Otherwise use custom routine | ||||||
|     _copy_file_contents (src, dst) |     _copy_file_contents (src, dst) | ||||||
|     if preserve_mode or preserve_times: |     if preserve_mode or preserve_times: | ||||||
|         st = os.stat (src) |         st = os.stat (src) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Greg Ward
						Greg Ward