Skip to content

Commit

Permalink
flag
Browse files Browse the repository at this point in the history
  • Loading branch information
an-tao committed Nov 28, 2021
1 parent 1687eb7 commit 788ffc8
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 @@ -68,7 +68,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 788ffc8

Please sign in to comment.