summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FileUtil.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2017-08-21 18:29:58 +0200
committerGitHub <noreply@github.com>2017-08-21 18:29:58 +0200
commit873521ce0ba9edbcbe896e6cff79ad54d7809b3f (patch)
tree714072ead2486e115de1ffe316432f2bdc43e9ad /Source/Core/Common/FileUtil.cpp
parentd0fc223fe172a2116351e487c32a0adcc8e59086 (diff)
Revert "Try to fix File::Copy with non-1024-byte aligned sizes"
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
-rw-r--r--Source/Core/Common/FileUtil.cpp4
1 files 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());