From 2d0cdc41d9ad0f5df411a2c785e5226ba82c3d7c Mon Sep 17 00:00:00 2001 From: Laurent Clouet Date: Fri, 17 Mar 2017 00:39:06 +0100 Subject: [PATCH] Bugfix: no free space detection should use the destination directory, not the actual file because it might not exist yet --- src/com/sheepit/client/Server.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/sheepit/client/Server.java b/src/com/sheepit/client/Server.java index 96df867..59ef98a 100644 --- a/src/com/sheepit/client/Server.java +++ b/src/com/sheepit/client/Server.java @@ -590,7 +590,7 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager return 0; } catch (Exception e) { - if (Utils.noFreeSpaceOnDisk(destination_)) { + if (Utils.noFreeSpaceOnDisk(new File(destination_).getParent())) { throw new FermeExceptionNoSpaceLeftOnDevice(); }