Patches item #1760357, was opened at 2007-07-25 16:54
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1760357&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Grzegorz Adam Hankiewicz (gradha)
Assigned to: Nobody/Anonymous (nobody)
Summary: ZipFile.write fails with bad modification time

Initial Comment:
Running on Windows XP against a networked file server with Windows 2003 I have 
a file which due to some obscure reason it has a negative modification time as 
returned by Python os functions. When I look at the file in the explorer the 
modification time column is blank, and when I view the properties of the file 
there the modification time is set to the 25th of April of 1906 at 2:03:44.

If I try to zip this file the zip creation fails with a Value error when the 
file's st_mtime value is passed to time.localtime().

I'm attaching a debug session log along with a possible patch to avoid such 
problems, though maybe the function that returns st_mtime should never return 
negative values because other library functions expect zero or positive values 
too.

In the log you will see that it is a custom rastertech\zipfile.py file that is 
failing. This is just the SVN development version of zipfile along with some 
modifications since changes like 1739648 seem to be very low priority. The 
patch is generated against a clean SVN version.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1760357&group_id=5470
_______________________________________________
Patches mailing list
Patches@python.org
http://mail.python.org/mailman/listinfo/patches

Reply via email to