From 873521ce0ba9edbcbe896e6cff79ad54d7809b3f Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Mon, 21 Aug 2017 18:29:58 +0200 Subject: [PATCH] Revert "Try to fix File::Copy with non-1024-byte aligned sizes" --- Source/Core/Common/FileUtil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 8d71dbde64..627cf9188f 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -358,7 +358,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) while (!input.eof()) { // read input - auto read_size = input.readsome(buffer, BSIZE); + input.read(buffer, BSIZE); if (!input) { ERROR_LOG(COMMON, "Copy: failed reading from source, %s --> %s", srcFilename.c_str(), @@ -367,7 +367,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) } // write output - if (!output.WriteBytes(buffer, read_size)) + if (!output.WriteBytes(buffer, BSIZE)) { ERROR_LOG(COMMON, "Copy: failed writing to output, %s --> %s: %s", srcFilename.c_str(), destFilename.c_str(), LastStrerrorString().c_str());