2008-07-03 18:00 UTC+0200 Viktor Szakats (harbour.01 syenar hu)

* contrib/hbmzip/hbmzip.c
     ! Fixed previous TOFIX for DOS.
     ! Fixed warning.
     ! Fixed mistake in previous commit.
This commit is contained in:
Viktor Szakats
2008-07-03 16:01:38 +00:00
parent edff135b13
commit b0d973ee75
2 changed files with 14 additions and 8 deletions

View File

@@ -8,6 +8,12 @@
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2008-07-03 18:00 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbmzip/hbmzip.c
! Fixed previous TOFIX for DOS.
! Fixed warning.
! Fixed mistake in previous commit.
2008-07-03 16:48 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbmzip/hbmzip.c
+ Added ".cmd" to the (commented) list of OS/2 executable

View File

@@ -560,12 +560,12 @@ static int hb_zipStoreFile( zipFile hZip, char* szFileName, char* szName, char*
ulExtAttr = iAttr & ( HB_FA_READONLY | HB_FA_HIDDEN | HB_FA_SYSTEM |
HB_FA_DIRECTORY | HB_FA_ARCHIVE );
if( ulExtAttr | FILE_ATTRIBUTE_READONLY )
if( ulExtAttr | HB_FA_READONLY )
ulExtAttr |= 0x01240000; /* r--r--r-- */
else
ulExtAttr |= 0x01B60000; /* rw-rw-rw- */
if( ulExtAttr & FILE_ATTRIBUTE_DIRECTORY )
if( ulExtAttr & HB_FA_DIRECTORY )
ulExtAttr |= 0x40000000;
else
ulExtAttr |= 0x80000000;
@@ -624,7 +624,7 @@ static int hb_zipStoreFile( zipFile hZip, char* szFileName, char* szName, char*
else
ulExtAttr |= 0x80000000;
#if 0 /* Please enable it if .exe, .bat and .com are executable files under OS2
#if 0 /* Please enable it if .exe, .bat and .com are executable files under OS2 */
ulLen = strlen( szZipName );
if( ulLen > 4 )
{
@@ -649,11 +649,6 @@ static int hb_zipStoreFile( zipFile hZip, char* szFileName, char* szName, char*
ulExtAttr = 0x81B60020; /* FILE_ATTRIBUTE_ARCHIVE | rw-rw-rw- */
}
#endif
zfi.external_fa = ulExtAttr;
/* TODO: zip.exe test: 0 for binary file, 1 for text. Does not depend on
extension. We should analyse content of file to determine this??? */
zfi.internal_fa = 0;
if( fError )
{
@@ -661,6 +656,11 @@ static int hb_zipStoreFile( zipFile hZip, char* szFileName, char* szName, char*
return -200;
}
zfi.external_fa = ulExtAttr;
/* TODO: zip.exe test: 0 for binary file, 1 for text. Does not depend on
extension. We should analyse content of file to determine this??? */
zfi.internal_fa = 0;
if( ulExtAttr & 0x40000000 )
{
iResult = zipOpenNewFileInZip3( hZip, szZipName, &zfi, NULL, 0, NULL, 0, NULL,