diff options
-rw-r--r-- | dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java index 49dfaa9f..a6752f2d 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbImage.java @@ -627,11 +627,15 @@ public class DbImage { private static void writeChunks(MysqlConnection connection, String imageVersionId, ChunkList chunks) throws SQLException { - if (chunks == null || chunks.isEmpty()) + if (chunks == null || chunks.isEmpty()) { + LOGGER.info("Not writing chunk list - empty or missing"); return; + } for (FileChunk chunk : chunks.getAll()) { - if (chunk.getSha1Sum() == null) + if (chunk.getSha1Sum() == null) { + LOGGER.info("Not writing chunk list - at least one hash missing"); return; + } } MysqlStatement stmt = connection.prepareStatement("INSERT IGNORE INTO imageblock" + " (imageversionid, startbyte, blocksize, blocksha1, ismissing) VALUES" |