Merge pull request #56 from DevFactory/bugfix-caused-by-pr-51
Fixing bug cause by PR#51
This commit is contained in:
@@ -42,11 +42,11 @@ public class FileUtil extends com.samskivert.util.FileUtil
|
|||||||
log.warning("Failed to delete old intermediate file " + temp + ".");
|
log.warning("Failed to delete old intermediate file " + temp + ".");
|
||||||
// the subsequent code will probably fail
|
// the subsequent code will probably fail
|
||||||
}
|
}
|
||||||
if (dest.renameTo(temp)) {
|
if (dest.renameTo(temp) && source.renameTo(dest)) {
|
||||||
if (source.renameTo(dest) && !temp.delete()) {
|
if (!temp.delete()) {
|
||||||
log.warning("Failed to delete intermediate file " + temp + ".");
|
log.warning("Failed to delete intermediate file " + temp + ".");
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user