nixpkgs/pkgs/tools/filesystems/zkfuse/zookeeper-1929.patch
Charles Strahan 3b73b726d4 zkfuse: init
2015-11-19 19:55:44 -05:00

16 lines
480 B
Diff

diff --git a/src/contrib/zkfuse/src/zkadapter.cc b/src/contrib/zkfuse/src/zkadapter.cc
index 886051d..93dbef5 100644
--- a/src/zkadapter.cc
+++ b/src/zkadapter.cc
@@ -845,7 +845,10 @@ ZooKeeperAdapter::getNodeData(const string &path,
string("Unable to get data of node ") + path, rc
);
} else {
- return string( buffer, buffer + len );
+ if (len == -1) {
+ len = 0;
+ };
+ return string( buffer, len );
}
}