diff options
Diffstat (limited to 'updater/src/com/intellij/updater/DeleteAction.java')
-rwxr-xr-x[-rw-r--r--] | updater/src/com/intellij/updater/DeleteAction.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/updater/src/com/intellij/updater/DeleteAction.java b/updater/src/com/intellij/updater/DeleteAction.java index 3dd1b850e415..286e4710f9e1 100644..100755 --- a/updater/src/com/intellij/updater/DeleteAction.java +++ b/updater/src/com/intellij/updater/DeleteAction.java @@ -43,13 +43,23 @@ public class DeleteAction extends PatchAction { @Override protected void doApply(ZipFile patchFile, File toFile) throws IOException { - Utils.delete(toFile); + try { + Utils.delete(toFile); + } catch (IOException e) { + if (Utils.isWindows() && toFile.exists()) { + throw new RetryException(e); + } else { + throw e; + } + } } + @Override protected void doBackup(File toFile, File backupFile) throws IOException { Utils.copy(toFile, backupFile); } + @Override protected void doRevert(File toFile, File backupFile) throws IOException { Utils.delete(toFile); // make sure there is no directory remained on this path (may remain from previous 'create' actions Utils.copy(backupFile, toFile); |