From 7e4e9214038ce1b394a8f9dc9fb914a6feb799f0 Mon Sep 17 00:00:00 2001 From: Victor Zarubkin Date: Tue, 27 Sep 2016 00:51:45 +0300 Subject: [PATCH] Linux build: have to COPY file contents. Sad :( --- src/reader.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/reader.cpp b/src/reader.cpp index 598b105..b86f3a1 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -239,16 +239,15 @@ extern "C" { return 0; ::std::stringstream str; - + #ifdef _WIN32 str.set_rdbuf(inFile.rdbuf()); - return fillTreesFromStream(progress, str, serialized_blocks, serialized_descriptors, descriptors, blocks, threaded_trees, gather_statistics); #else - auto oldbuf = str.rdbuf(inFile.rdbuf()); - auto result = fillTreesFromStream(progress, str, serialized_blocks, serialized_descriptors, descriptors, blocks, threaded_trees, gather_statistics); - str.rdbuf(oldbuf); - return result; + str << inFile.rdbuf(); + inFile.close(); #endif + + return fillTreesFromStream(progress, str, serialized_blocks, serialized_descriptors, descriptors, blocks, threaded_trees, gather_statistics); } //////////////////////////////////////////////////////////////////////////