We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1687eb7 commit 788ffc8Copy full SHA for 788ffc8
1 file changed
lib/src/HttpFileImpl.cc
@@ -68,7 +68,8 @@ int HttpFileImpl::saveTo(const filesystem::path &pathAndFileName) const
68
{
69
LOG_TRACE << "save uploaded file:" << pathAndFileName;
70
auto wPath = utils::toNativePath(pathAndFileName.native());
71
- std::ofstream file(wPath, std::ios::binary);
+ std::ofstream file(wPath,
72
+ std::ios::binary | std::ios::out | std::ios::trunc);
73
if (file.is_open())
74
75
file.write(fileContent_.data(), fileContent_.size());
0 commit comments