Skip to content

Commit

Permalink
flag
Browse files Browse the repository at this point in the history
  • Loading branch information
an-tao committed Dec 10, 2021
1 parent ee56234 commit 4c151e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/HttpFileImpl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ int HttpFileImpl::saveTo(const filesystem::path &pathAndFileName) const
{
LOG_TRACE << "save uploaded file:" << pathAndFileName;
auto wPath = utils::toNativePath(pathAndFileName.native());
std::ofstream file(wPath, std::ios::binary);
std::ofstream file(wPath,
std::ios::binary | std::ios::out | std::ios::trunc);
if (file.is_open())
{
file.write(fileContent_.data(), fileContent_.size());
Expand Down

0 comments on commit 4c151e6

Please sign in to comment.