Skip to content
Snippets Groups Projects
Commit 29ce3261 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Avoid final empty block creation when file size is greater than block size.

parent f10cefd4
No related branches found
No related tags found
No related merge requests found
Pipeline #16067 passed
......@@ -191,16 +191,14 @@ class RetrieveExecutor(TaskExecutor):
#self.totalSize += fileSize
# check if the file is larger than a block size
if fileSize > self.maxBlockSize:
# if the current block is not empty, "close" it, otherwise
# use it and then create a new block
# if the current block is not empty, "close" it,
# otherwise use it
if blockSize > 0:
blockIdx += 1
fileInfo["blockIdx"] = blockIdx
blockIdx += 1
else:
fileInfo["blockIdx"] = blockIdx
blockIdx += 1
blockSize = 0
blockSize = self.maxBlockSize
else:
# the file can be contained by a block, so check if
# the file size plus the current block fill is lower
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment