mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Issue #4616: TarFile.utime(): Restore directory times on Windows.
This commit is contained in:
		
							parent
							
								
									4c96fa5525
								
							
						
					
					
						commit
						3b02742f7d
					
				
					 3 changed files with 5 additions and 10 deletions
				
			
		|  | @ -2284,10 +2284,6 @@ def utime(self, tarinfo, targetpath): | |||
|         """ | ||||
|         if not hasattr(os, 'utime'): | ||||
|             return | ||||
|         if sys.platform == "win32" and tarinfo.isdir(): | ||||
|             # According to msdn.microsoft.com, it is an error (EACCES) | ||||
|             # to use utime() on directories. | ||||
|             return | ||||
|         try: | ||||
|             os.utime(targetpath, (tarinfo.mtime, tarinfo.mtime)) | ||||
|         except EnvironmentError, e: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lars Gustäbel
						Lars Gustäbel