From 8876725b1aed4721ae66bbf237d37dd82aebeeea Mon Sep 17 00:00:00 2001 From: Faisal Hameed Date: Wed, 18 May 2016 06:17:25 +0500 Subject: [PATCH] Fixing bug cause by PR#51 --- src/main/java/com/threerings/getdown/util/FileUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/threerings/getdown/util/FileUtil.java b/src/main/java/com/threerings/getdown/util/FileUtil.java index a22eca1..c957e59 100644 --- a/src/main/java/com/threerings/getdown/util/FileUtil.java +++ b/src/main/java/com/threerings/getdown/util/FileUtil.java @@ -42,11 +42,11 @@ public class FileUtil extends com.samskivert.util.FileUtil log.warning("Failed to delete old intermediate file " + temp + "."); // the subsequent code will probably fail } - if (dest.renameTo(temp)) { - if (source.renameTo(dest) && !temp.delete()) { + if (dest.renameTo(temp) && source.renameTo(dest)) { + if (!temp.delete()) { log.warning("Failed to delete intermediate file " + temp + "."); - return true; } + return true; } }