Skip to content

Commit df17431

Browse files
committed
thing
1 parent 2c0f084 commit df17431

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main/java/xyz/webmc/originblacklist/base/OriginBlacklist.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,13 @@ public final void updatePlugin(final Runnable action1, final Runnable action2) {
271271
} finally {
272272
conn.disconnect();
273273
}
274-
Files.delete(jar);
275-
Files.delete(bak);
276-
this.jarFile = upd;
277-
action1.run();
278-
return;
274+
if (Files.exists(upd)) {
275+
Files.delete(jar);
276+
Files.delete(bak);
277+
this.jarFile = upd;
278+
action1.run();
279+
return;
280+
}
279281
} catch (final Throwable t) {
280282
Files.move(bak, jar, StandardCopyOption.REPLACE_EXISTING);
281283
throw t;

0 commit comments

Comments
 (0)