Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java9
1 files changed, 6 insertions, 3 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 4540860a0d..08bb6cb7fa 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
@@ -371,8 +371,9 @@ public class GC {
continue oldPackLoop;
if (!oldPack.shouldBeKept()
- && repo.getFS().lastModified(
- oldPack.getPackFile()) < packExpireDate) {
+ && repo.getFS()
+ .lastModifiedInstant(oldPack.getPackFile())
+ .toEpochMilli() < packExpireDate) {
oldPack.close();
if (shouldLoosen) {
loosen(inserter, reader, oldPack, ids);
@@ -560,8 +561,10 @@ public class GC {
String fName = f.getName();
if (fName.length() != Constants.OBJECT_ID_STRING_LENGTH - 2)
continue;
- if (repo.getFS().lastModified(f) >= expireDate)
+ if (repo.getFS().lastModifiedInstant(f)
+ .toEpochMilli() >= expireDate) {
continue;
+ }
try {
ObjectId id = ObjectId.fromString(d + fName);
if (objectsToKeep.contains(id))

Back to the top