mercredi 27 juillet 2016

Unzip unzipping at two places for no reason?

So I am trying to unzip a file and it behaves very unexpectedly.

I am running this from php code:

system('unzip -o ' . __DIR__ . '/support/patent.zip -d /tmp/');

It can fetch the correct file and unzips it. But if the patent.zip changes and I changed it deliberately, it still somehow unzips the old one, I can tell by the size of the unzipped version. Moreover, it also unzips the new one but in directory like /tmp/Users/rohan0793..... so basically appends the path of the patent.zip to the /tmp path and the new one is unzipped in that path.

I am not sure what I am doing wrong here tho. Like it doesn't unzip incorrectly for the original one but when the zip is changed, the old one is still somehow unzipped and the new one heads to an unexpected path.

What is going on here?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire