diff --git a/updater/src/com/intellij/updater/DeleteAction.java b/updater/src/com/intellij/updater/DeleteAction.java index 3dd1b850e415..8bc43ac41bb1 100644 --- a/updater/src/com/intellij/updater/DeleteAction.java +++ b/updater/src/com/intellij/updater/DeleteAction.java @@ -51,7 +51,9 @@ public class DeleteAction extends PatchAction { } 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); + if (!toFile.exists() || isModified(toFile)) { + Utils.delete(toFile); // make sure there is no directory remained on this path (may remain from previous 'create' actions + Utils.copy(backupFile, toFile); + } } }