Currently, the zip extraction opens all the files in the zip, copies them to the install directory, then closes them together.
This can lead to "too many open files" issue if the zip contains many files.
It happens because the defer zippedFile.Close() closes the file only at the end of the function, and not at the end of the current scope (for loop).
This PR addresses this limitation by shifting the extraction logic of a single file to a dedicated function. This way each file will be closed before we start to extract the next one.
fix #130
Currently, the zip extraction opens all the files in the zip, copies them to the install directory, then closes them together.
This can lead to "too many open files" issue if the zip contains many files.
It happens because the
defer zippedFile.Close()
closes the file only at the end of the function, and not at the end of the current scope (for loop).This PR addresses this limitation by shifting the extraction logic of a single file to a dedicated function. This way each file will be closed before we start to extract the next one.