Winston Li 9 лет назад
Родитель
Сommit
fd743d1bf3

+ 3 - 2
services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/util/Tar.java

@@ -101,8 +101,9 @@ public class Tar {
             }
             long size = e.getSize();
             Preconditions.checkArgument(
-                    size > 0 && size < Integer.MAX_VALUE,
-                    "file too big: tarTo should have thrown an IOException"
+                    size >= 0 && size <= Integer.MAX_VALUE,
+                    "file too big (" + size + " B): " +
+                            "tarTo should have thrown an IOException"
             );
             try (OutputStream out = new FileOutputStream(f)) {
                 /* TarInputStream pretends each