summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorPhilipp Thun2011-02-22 13:02:50 (EST)
committer Philipp Thun2011-02-22 13:04:24 (EST)
commit8adeced370c1754d945241975599379cbceff9f7 (patch)
tree031debc9ca3b70a4dc190f5df6356cb5e828215f
parentaa8d899eda59ff319c6b3d4989b008e162f1358b (diff)
downloadegit-8adeced370c1754d945241975599379cbceff9f7.zip
egit-8adeced370c1754d945241975599379cbceff9f7.tar.gz
egit-8adeced370c1754d945241975599379cbceff9f7.tar.bz2
Close repository before deleting its working directoryrefs/changes/68/2568/1
When deleting a repository (from the Git Repositories view) and checking the option 'Also delete working directory' this failed in case projects had been imported into the Eclipse workspace from this repository before. Change-Id: I9fa0b35e929c7b7e8b1bf75bdb56ce8ab36d99a1 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/RemoveCommand.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/RemoveCommand.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/RemoveCommand.java
index 26848c9..df3cfe0 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/RemoveCommand.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/RemoveCommand.java
@@ -177,6 +177,7 @@ public class RemoveCommand extends
try {
for (RepositoryNode node : selectedNodes) {
Repository repo = node.getRepository();
+ repo.close();
if (!repo.isBare() && deleteWorkDir)
FileUtils.delete(repo.getWorkTree(),
FileUtils.RECURSIVE | FileUtils.RETRY);