]> source.dussan.org Git - jgit.git/commit
Fix CleanCommand not to throw FileNotFoundExceptions 01/116801/2
authorChristian Halstrick <christian.halstrick@sap.com>
Tue, 6 Feb 2018 14:32:14 +0000 (15:32 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 8 Feb 2018 09:27:21 +0000 (10:27 +0100)
commit4d5231f0013d2b5239f00277475d3804be38366d
tree67a220c7da355e40c21e5cf5847ec18c4c7b1f4b
parent93654f75a25d9af193731a97d2db675f57cc86bb
Fix CleanCommand not to throw FileNotFoundExceptions

When CleanCommand is collecting the files and folders to be deleted
it may happen that the list of directories contains obsolete entries.
E.g. a folder and its parent folder may be in the list. Only the
parent folder would be sufficient.

This was a reason for hitting FileNotFoundExceptions when finally
trying to delete the files and folders. Improve CleanCommand
to ignore files to be deleted which are already gone.

Bug: 514434
Change-Id: I10caa01bfb9cec5967dfdaea50c6e4a713eeeabd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CleanCommandTest.java
org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java