Bug for ZIP 2.3 (November 29th 1999) Win32 version:
When a file is partially locked, ZIP ignores the
contents of the file, without displaying an error or
warning message.
An example of such a file is the data file of
MS-Outlook 2000, outlook.pst. When Outlook is running,
ZIP stores the file outlook.pst with a length of 0 and
does not display any error message.
The copy command ("copy outlook.pst x") displays the
following error message:
"The process cannot access the file because another
process has locked a portion of the file."
This bug is fatal when ZIP is used in a backup script,
because there is no indication that something went wrong.
(I already posted this bug description on 2004-10-25
via the "Info-ZIP Bug Report" form at
http://www.info-zip.org/zip-bug.html, but I didn't get
a reply and the bug is not yet listed in the FAQ bug
list. The Info-ZIP project needs a bug tracking system,
and there is not even a working mailing list. The
latest version of ZIP is from 1999. There should be a
way to contribute patches. ...)
Logged In: YES
user_id=481420
There is a forum at: http://www.quicktopic.com/27/H/V6ZQZ54uKNL
Logged In: YES
user_id=481420
I have uploaded a patch (1074400) for this bug.
Logged In: YES
user_id=1172496
Originator: NO
You got alot there. I think I remember seeing this posted at the group mail address a while back, but here's some attempts at answers here.
The locked file issue should be resolved in Zip 3.0f and may be handled better in Zip 2.32. Note that when Zip 3.0f hits a file it can't read, and I think this is true for Zip 2.32 also, Zip returns the OPEN error code after completing the archive. So check the return code to see if something was not readable. Zip 3.0f also provided a new option, -MM, that will abort if a file is not readable and not create an archive. Zip 3.0f also supports creating log files. I suggest that Zip 2.32 be checked and repost if that is buggy and that Zip 3.0f be checked once posted.
A bug tracking system would be good, but that's still on the todo list. A new discussion forum may be coming soon though to replace the mailing lists and the spammed QuickTopic forum. How to contribute patches is an issue being discussed now.
Logged In: YES
user_id=481420
Originator: YES
This bug is not fixed in Zip 3.0f and 2.32. Both versions don't display an error message when a file is partially locked, they just ignore the data.
I have written the following Win32 test program to partially lock a file.
When a file is partially locked with this test program, it is stored with length 0 in the Zip archive.
#include <stdio.h>
#include <Windows.h>
int main (int argc, char* argv[]) {
char* fileName;
HANDLE* file;
BOOL ok;
if (argc != 2) {printf ("Missing file name.\n"); return 9; }
fileName = argv[1];
printf ("Locking file \"%s\" partially...\n",fileName);
file = CreateFile(fileName, GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, 0, NULL);
if (file == INVALID_HANDLE_VALUE) {printf ("Open failed.\n"); return 9; }
ok = LockFile(file, 1, 0, 1, 0); // lock one byte at offset 1
if (ok == 0) {printf ("Locking falied.\n"); return 9; }
printf ("Press Enter to continue - ");
getchar();
CloseHandle (file);
return 0; }