Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » bug in the routine involving the time of the zip file (time parameter in the method WriteFile class Zip )
bug in the routine involving the time of the zip file [message #59329] Thu, 15 December 2022 23:24 Go to next message
BetoValle is currently offline  BetoValle
Messages: 203
Registered: September 2020
Location: Brasil Valinhos SP
Experienced Member
Hi,

using the routine for saving compressed files in the zip file, I found that in some cases there is divergence from the time passed as parameter. I performed tests, just like the attached image. That is, if you save a file that was modified at a certain "second", the routine, for some wrong reason, saves it at the later or lower second
(very strange, as if the seconds were rounded off!)

Thanks!

void addzip(String fnOrig){
  FileZip zip("c:\\temp\\compress.zip");  
  FindFile fff(fnOrig);
  while(fff) {
     if(fff.IsFile()) {
        String s=fff.GetPath();
        zip.WriteFile(LoadFile(s), fnOrig,ab,fff.GetLastWriteTime() ); 
     }
     fff.Next();
  }
  zip.Finish();
};
  • Attachment: zip.png
    (Size: 142.82KB, Downloaded 65 times)
Re: bug in the routine involving the time of the zip file [message #59336 is a reply to message #59329] Sat, 17 December 2022 14:18 Go to previous message
mirek is currently offline  mirek
Messages: 13986
Registered: November 2005
Ultimate Member
For some reason, zip format has 2 second resolution (do not ask me why... Smile
Previous Topic: PdfDraw, custom DPI request + my fix
Next Topic: ScrollBarSize() - Is it (possibly) a bug?
Goto Forum:
  


Current Time: Sun Jun 23 11:00:02 CEST 2024

Total time taken to generate the page: 0.02802 seconds