diff options
author | René Scheibe <rene.scheibe@gmail.com> | 2018-08-04 13:19:17 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-06-19 11:52:02 +0200 |
commit | 8f9697b4c182be6f4ec3eeda130bd57237f154c7 (patch) | |
tree | 985d63ce69b7aa909bd7fbb78811117a598b76e8 /org.eclipse.jgit/src/org/eclipse/jgit/dircache | |
parent | b4edf9ec142cd8d728800625926e12a7cecfa52e (diff) | |
download | jgit-8f9697b4c182be6f4ec3eeda130bd57237f154c7.tar.gz jgit-8f9697b4c182be6f4ec3eeda130bd57237f154c7.zip |
Fix "reset -hard" bug that folders could not be deleted
The deleted code is not required as removed files are deleted correctly in
doCheckout() anyway.
The deleted code failed in case a non-empty directory had to be deleted.
file.delete() returned false, triggering an exception.
Bug: 479266
Change-Id: I011bb3882ff0c35b238aa3eccad7889041210277
Signed-off-by: René Scheibe <rene.scheibe@gmail.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/dircache')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java index 47c9150529..3b2e74e9e4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java @@ -1298,14 +1298,6 @@ public class DirCacheCheckout { JGitText.get().cannotDeleteFile, c)); removeEmptyParents(conflict); } - for (String r : removed) { - File file = new File(repo.getWorkTree(), r); - if (!file.delete()) - throw new CheckoutConflictException( - MessageFormat.format(JGitText.get().cannotDeleteFile, - file.getAbsolutePath())); - removeEmptyParents(file); - } } /** |