浏览代码

Merge pull request #8388 from richardkchapman/git-truncate

HPCC-15219 Reading files direct from git repos may truncate

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 9 年之前
父节点
当前提交
7e174dd7dc
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      common/remote/hooks/git/gitfile.cpp

+ 2 - 1
common/remote/hooks/git/gitfile.cpp

@@ -93,7 +93,8 @@ public:
                 if (sizeRead < chunkSize)
                 {
                     buf.setLength(buf.length() - (chunkSize - sizeRead));
-                    break;
+                    if (!sizeRead)
+                        break;
                 }
             }
             pipe->closeOutput();