Skip to content
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

java.util.zip.ZipException: error in opening zip file #11

Open
lycano opened this issue Oct 21, 2013 · 0 comments
Open

java.util.zip.ZipException: error in opening zip file #11

lycano opened this issue Oct 21, 2013 · 0 comments

Comments

@lycano
Copy link
Contributor

lycano commented Oct 21, 2013

Full Stacktrace and references as i the code lines do not match (logic still is the same)

23:51:50 [WARNING] [xAuth] The auto-updater tried to unzip a new update file, but was unsuccessful.
23:51:50 [SEVERE] java.util.zip.ZipException: error in opening zip file
23:51:50 [SEVERE]       at java.util.zip.ZipFile.open(Native Method)
23:51:50 [SEVERE]       at java.util.zip.ZipFile.<init>(ZipFile.java:127)
23:51:51 [SEVERE]       at de.luricos.bukkit.xAuth.updater.Updater.unzip(Updater.java:471)
23:51:51 [SEVERE]       at de.luricos.bukkit.xAuth.updater.Updater.saveFile(Updater.java:362)
23:51:51 [SEVERE]       at de.luricos.bukkit.xAuth.updater.Updater.access$1000(Updater.java:66)
23:51:51 [SEVERE]       at de.luricos.bukkit.xAuth.updater.Updater$UpdateRunnable.run(Updater.java:688)
23:51:51 [SEVERE]       at java.lang.Thread.run(Thread.java:662)

de.luricos.bukkit.xAuth.updater.Updater$UpdateRunnable.run(Updater.java:688)
Updater.this.saveFile(new File(Updater.this.plugin.getDataFolder().getParent(), Updater.this.updateFolder), name, Updater.this.versionLink);

de.luricos.bukkit.xAuth.updater.Updater.access$1000(Updater.java:66)
public class Updater {

de.luricos.bukkit.xAuth.updater.Updater.saveFile(Updater.java:362)
this.unzip(dFile.getCanonicalPath());

de.luricos.bukkit.xAuth.updater.Updater.unzip(Updater.java:471)
ZipFile zipFile = new ZipFile(fSourceZip);
or
ZipFile zipFile = new ZipFile(fSourceZip, ZipFile.OPEN_READ);

OS: Linux Debian

When downloading the file from DBO the file will be deleted before it can be unzipped.

To fix this you need to move the cleanup code block to the top.

As my pull request does include more fixes and additions no pull request attached to this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant