claudiodangelis / qrcp

:zap: Transfer files over wifi from your computer to your mobile device by scanning a QR code without leaving the terminal.
https://qrcp.sh
MIT License
9.96k stars 529 forks source link

Fixing deleting temporary files #304

Closed vincenzoAiello closed 10 months ago

vincenzoAiello commented 10 months ago

This fixes deleting temporary files.

I have written again the compression of the files and folders without the using of external libraries.

This resolves the issue #277

claudiodangelis commented 10 months ago

Hello @vincenzoAiello , thanks for this! I'm reviewing it now, Claudio

claudiodangelis commented 10 months ago

Hello, I might be missing something, but I don't understand how it fixes the issue with deleting temporary files. Could you please provide some context? Thanks! C

vincenzoAiello commented 10 months ago

Hello @claudiodangelis, the problem is in the "Create" and "Close" functions because the zip file isn't closed properly. These are the original functions of the library: 1 2

The problem is that the zip file is opened but it is never closed. Only the writer is closed. So, when you try to delete the temporary zip file, it gives an error. Infact if i modify the code in this way it works: 1 (2) 2 (2) 3

BR Vincenzo