Browse Source

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 years ago
parent
commit
7e174dd7dc
1 changed files with 2 additions and 1 deletions
  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();