From 050c24c85bdf0bf9694e5004400a375092c4e44f Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 7 May 2016 10:03:48 +0100 Subject: [PATCH] Use SGBinaryFile in a couple more places. Most importantly, when computing a hash from the on-disk state. --- simgear/io/HTTPRepository.cxx | 2 +- simgear/io/test_repository.cxx | 2 +- simgear/package/CatalogTest.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/simgear/io/HTTPRepository.cxx b/simgear/io/HTTPRepository.cxx index 09f2f8e5..f2dcc943 100644 --- a/simgear/io/HTTPRepository.cxx +++ b/simgear/io/HTTPRepository.cxx @@ -843,7 +843,7 @@ HTTPRepository::failure() const sha1_init(&info); char* buf = static_cast(malloc(1024 * 1024)); size_t readLen; - SGFile f(p.str()); + SGBinaryFile f(p.str()); if (!f.open(SG_IO_IN)) { throw sg_io_exception("Couldn't open file for compute hash", p); } diff --git a/simgear/io/test_repository.cxx b/simgear/io/test_repository.cxx index 6ea61c10..760223d0 100644 --- a/simgear/io/test_repository.cxx +++ b/simgear/io/test_repository.cxx @@ -286,7 +286,7 @@ std::string test_computeHashForPath(const SGPath& p) char* buf = static_cast(alloca(1024 * 1024)); size_t readLen; - SGFile f(p.str()); + SGBinaryFile f(p.str()); f.open(SG_IO_IN); while ((readLen = f.read(buf, 1024 * 1024)) > 0) { diff --git a/simgear/package/CatalogTest.cxx b/simgear/package/CatalogTest.cxx index 216e4522..22a4cd54 100644 --- a/simgear/package/CatalogTest.cxx +++ b/simgear/package/CatalogTest.cxx @@ -46,7 +46,7 @@ std::string readFileIntoString(const SGPath& path) std::string contents; size_t readLen; - SGFile f(path.str()); + SGBinaryFile f(path.str()); if (!f.open(SG_IO_IN)) { throw sg_io_exception("Couldn't open file", path); } -- 2.39.5