Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2020-11-25 23:24:56 +0000
committerMatthias Sohn2020-11-26 00:17:49 +0000
commit3996408cdefccadaf64ec3e0a4e84c8206ca4f90 (patch)
tree72cb5e7c8fc0bbe6ca4928256a0a8234d1fd88ef
parentfde7a271a4f961484ae6e8357fd64277cfc03585 (diff)
downloadjgit-3996408cdefccadaf64ec3e0a4e84c8206ca4f90.tar.gz
jgit-3996408cdefccadaf64ec3e0a4e84c8206ca4f90.tar.xz
jgit-3996408cdefccadaf64ec3e0a4e84c8206ca4f90.zip
GC#deleteOrphans: handle failure to list files in pack directory
- log an error - either there is no list or it is incomplete hence return immediately Change-Id: Ieee5378ca06304056b9ccc30c1acd5f52360052d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
index 25c5dcf8a5..5bc2052f85 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
@@ -986,8 +986,9 @@ public class GC {
// .pack, .keep, .index, .bitmap to avoid look ahead
.sorted(Collections.reverseOrder())
.collect(Collectors.toList());
- } catch (IOException e1) {
- // ignore
+ } catch (IOException e) {
+ LOG.error(e.getMessage(), e);
+ return;
}
if (fileNames == null) {
return;

Back to the top