Revert "Try to fix File::Copy with non-1024-byte aligned sizes"
This commit is contained in:
parent
d0fc223fe1
commit
873521ce0b
|
@ -358,7 +358,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename)
|
||||||
while (!input.eof())
|
while (!input.eof())
|
||||||
{
|
{
|
||||||
// read input
|
// read input
|
||||||
auto read_size = input.readsome(buffer, BSIZE);
|
input.read(buffer, BSIZE);
|
||||||
if (!input)
|
if (!input)
|
||||||
{
|
{
|
||||||
ERROR_LOG(COMMON, "Copy: failed reading from source, %s --> %s", srcFilename.c_str(),
|
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
|
// 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(),
|
ERROR_LOG(COMMON, "Copy: failed writing to output, %s --> %s: %s", srcFilename.c_str(),
|
||||||
destFilename.c_str(), LastStrerrorString().c_str());
|
destFilename.c_str(), LastStrerrorString().c_str());
|
||||||
|
|
Loading…
Reference in New Issue