diff options
Diffstat (limited to 'dozentenmodulserver/src/main/java')
| -rw-r--r-- | dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/IncomingDataTransfer.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/IncomingDataTransfer.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/IncomingDataTransfer.java index 7bad59a3..92f533e8 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/IncomingDataTransfer.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/IncomingDataTransfer.java @@ -489,8 +489,12 @@ public class IncomingDataTransfer extends AbstractTransfer implements HashCheckC return null; // No more chunks, returning null tells the Downloader we're done. } // Check remaining disk space and abort if it's too low - if (FileSystem.getAvailableStorageBytes() < MIN_FREE_SPACE_BYTES) { + long space = FileSystem.getAvailableStorageBytes(); + if (space != -1 && space < MIN_FREE_SPACE_BYTES) { downloader.sendErrorCode("Out of disk space"); + LOGGER.error("Out of space: Cancelling upload of " + + (image == null ? "image" : image.imageName) + " by " + + Formatter.userFullName(owner)); cancel(); return null; } |
