diff options
author | Kevin Sawicki | 2012-01-30 22:24:19 +0000 |
---|---|---|
committer | Matthias Sohn | 2012-02-03 01:12:10 +0000 |
commit | f96cdd4e042222ef8a1ca8077e157bdbde36ba0b (patch) | |
tree | 354d2fca209e6eb4324b66d2771da4239e2f4cf7 | |
parent | 9533d2923f3554daf5612dad55d6d05ce1d5f355 (diff) | |
download | egit-f96cdd4e042222ef8a1ca8077e157bdbde36ba0b.tar.gz egit-f96cdd4e042222ef8a1ca8077e157bdbde36ba0b.tar.xz egit-f96cdd4e042222ef8a1ca8077e157bdbde36ba0b.zip |
Add proper check to ensure created folder is cleaned up
Previously missing '!' before hasRoot to ensure folder is only
deleted if it didn't previously exist and was created to stage
a project that is being closed due to it missing on the current
branch
Change-Id: I590c0768bb17df21cc45412527a843ce5f234be1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r-- | org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ProjectUtil.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ProjectUtil.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ProjectUtil.java index 7b159bb3e6..fda8b662da 100644 --- a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ProjectUtil.java +++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ProjectUtil.java @@ -184,7 +184,7 @@ public class ProjectUtil { closeFailed = true; } // Clean up created folder - if (hasRoot) + if (!hasRoot) try { FileUtils.delete(projectRoot, FileUtils.RETRY | FileUtils.SKIP_MISSING | FileUtils.RECURSIVE); |