-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Lua] Failed Extract leaves open file handle #31
Comments
We'll look into it - thanks for letting us know |
Is this related to your comment in your script source about large files not extracting as well @DerfJagged ? Noticed it last week and had it on my agenda to look into this week anyways. |
It's two separate issues:
|
@DerfJagged you mention an "invalid zip file" in your original message, but both your last message (and the log error entry you originally shared) reference a I looked for the "DO NOT DOWNLOAD" item in the Homebrew Store directory, but didn't see it in either of your last two commits. Thanks for your help. |
@Ste1io When you use the http command to download files, you specify the file extension it will be saved as, so it will successfully download it and it will always be named as .7z, which is why the log entry mentions tmp.7z.
I ran into it because I had linked The "DO NOT DOWNLOAD" option is on the actual homebrew store. Run the script on your Xbox, go to the "ConsoleMods - Other" directory, and it's the last item. It will download, fail to extract, and that tmp.7z file will still be held open which breaks any further downloads until you restart Aurora. |
It looks like there might be a bug in Aurora's Lua for zip handling.
If I have an invalid zip at PATH_TO_ZIP and run this:
Then it will fail the zip.Extract and show the "Extraction failed!" error, as you'd expect.
However, it seems to keep an open file handle on the zip file, and the FileSystem.DeleteFile command fails, and you can't even manually delete the file via FTP until you reboot Aurora. I don't see any script developer accessible ZipFile.CloseFile command, so I think Aurora source needs to be adjusted to close the file upon Extract failure.
The log shows this message:
{ "time" : "17:32:28.500", "thread" : "0xF9000004", "type" : "normal", "filter" : "RecursiveDeleteDirectory", "message" : "Failed to delete file: Game:\User\Scripts\Utility\HomebrewStore\Downloads\tmp.7z. Error Code: 32" }
For a practical example, I had a typo on a link in the Homebrew Store and it caused that download to fail, but since it kept an open file handle, it would not allow any subsequent downloads to extract since they were trying to write to the same place.
If you want to test it, I've made an item called "DO NOT DOWNLOAD" at the very bottom of the "Other" section of the homebrew store which will trigger this bug.
The text was updated successfully, but these errors were encountered: