Skip to content

Commit 788ffc8

Browse files
committed
flag
1 parent 1687eb7 commit 788ffc8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/src/HttpFileImpl.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ int HttpFileImpl::saveTo(const filesystem::path &pathAndFileName) const
6868
{
6969
LOG_TRACE << "save uploaded file:" << pathAndFileName;
7070
auto wPath = utils::toNativePath(pathAndFileName.native());
71-
std::ofstream file(wPath, std::ios::binary);
71+
std::ofstream file(wPath,
72+
std::ios::binary | std::ios::out | std::ios::trunc);
7273
if (file.is_open())
7374
{
7475
file.write(fileContent_.data(), fileContent_.size());

0 commit comments

Comments
 (0)