[BUG] Extracting a zip to a network-drive changes timestamps
Moderators: white, Hacker, petermad, Stefan2
[BUG] Extracting a zip to a network-drive changes timestamps
Hi,
Using the internal packer to extract a ZIP-file to a network-drive,
the files are extracted OK, but the time-stamp of the extracted files
is set to the time they were extracted, and not to their original time.
- Tried this with ZIP-files on Windows-XP (English) version.
- When extracting to a local drive it works OK.
- Have noticed this on previous releases, and on the latest one (v6.54) also.
- Tried to change the 'copy' options, including the 'compatibility' mode.
- does not matter if I use UNC (\\net-drive\...) or a mapped drive (N:\...)
- playing with the internal packer/unpacker options did not help either.
If someone has a clue, please help...
Thanks,
GG
Using the internal packer to extract a ZIP-file to a network-drive,
the files are extracted OK, but the time-stamp of the extracted files
is set to the time they were extracted, and not to their original time.
- Tried this with ZIP-files on Windows-XP (English) version.
- When extracting to a local drive it works OK.
- Have noticed this on previous releases, and on the latest one (v6.54) also.
- Tried to change the 'copy' options, including the 'compatibility' mode.
- does not matter if I use UNC (\\net-drive\...) or a mapped drive (N:\...)
- playing with the internal packer/unpacker options did not help either.
If someone has a clue, please help...
Thanks,
GG
- ghisler(Author)
- Site Admin
- Posts: 48108
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
This is probably a Samba drive (Unix/Linux), right? Some of these have this bug. TC unpacks like this:
1. Create the target file
2. Write all data to it
3. Set file timestamp from archive
4. Close file
The problem seems to be that some drives set the date to current in step 4, so the date change from step 3 is lost. I haven't found out yet how this problem can be avoided, sorry.
1. Create the target file
2. Write all data to it
3. Set file timestamp from archive
4. Close file
The problem seems to be that some drives set the date to current in step 4, so the date change from step 3 is lost. I haven't found out yet how this problem can be avoided, sorry.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Thanks for the prompt reply.
Some more details and a suggestion -
1. This is happening on a NetApp drive.
2. Not happening on other SUN (samba) or WinXP.
3. Same problem (on NetApp drive) arises with PowerArchiver, but working fine with WinZip.
4. I can still change the timestamps of files on the NetApp drive with: File > Change Attributes.
Considering item (4), will you consider adding a 'NetApp Compatibility' mode
that will first extract the files and only then change their timestamp?
Thanks
GG
Some more details and a suggestion -
1. This is happening on a NetApp drive.
2. Not happening on other SUN (samba) or WinXP.
3. Same problem (on NetApp drive) arises with PowerArchiver, but working fine with WinZip.
4. I can still change the timestamps of files on the NetApp drive with: File > Change Attributes.
Considering item (4), will you consider adding a 'NetApp Compatibility' mode
that will first extract the files and only then change their timestamp?
Thanks
GG
- ghisler(Author)
- Site Admin
- Posts: 48108
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
If I only knew how to do that! I have a few ideas, like calling "flush" before setting the time stamp, or closing and re-opening the file, but don't know whether they would work or not. Can you please check with the "filemon" tool from www.sysinternals.com how winzip writes to this drive?Considering item (4), will you consider adding a 'NetApp Compatibility' mode
that will first extract the files and only then change their timestamp?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I can confirm that in my programs (C++, not Delphi) a flush helps to set the time successfully. Without the flush I had sometimes the same problems in past.ghisler(Author) wrote: If I only knew how to do that! I have a few ideas, like calling "flush" before setting the time stamp, or closing and re-opening the file, but don't know whether they would work or not. Can you please check with the "filemon" tool from www.sysinternals.com how winzip writes to this drive?
[x] nail here for new monitor
- ghisler(Author)
- Site Admin
- Posts: 48108
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I will consider a flush for TC 7.0. I will not include it in TC 6.54a though, because it may have many other unwanted side effects, and could cause a major slowdown too.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com