I have a zip
command issue on Linux.
-
From command prompt:
zip -r /../../../tst.zip /../../../tst/json
createstst.zip
file.unzip tst.zip
is successful. -
With in c++ code:
char zipcommand[sqglobal::MAX_SQ_FILE_PATH_LENGTH]={0}; sprintf (zipcommand, "zip -r %s %s", "/../../../tst.zip", "/../../../tst/json"); system(zipcommand);
from command prompt, unzipping the zip file generated by code fails.
[root@localhost bin]# unzip SoftwareInventory.zip
Archive: SoftwareInventory.zip
file #1: bad zipfile offset (local header sig): 0
[root@localhost bin]#
The size of json file is 1260 Bytes. zip file size is 522 bytes.
Why unzip fails? what the error implies?
Aucun commentaire:
Enregistrer un commentaire