specify truncate flag explicitely #151

Merged
meggert merged 1 commits from specify-truncate-flag-explicitely into develop 2023-06-19 09:32:20 +02:00
1 changed files with 2 additions and 1 deletions

View File

@ -165,7 +165,8 @@ ReturnValue_t HostFilesystem::truncateFile(FilesystemParams params) {
if (not filesystem::exists(path, e)) {
return FILE_DOES_NOT_EXIST;
}
ofstream of(path);
// Specify truncaion flug explicitely.
ofstream of(path, std::ios::out | std::ios::trunc);
return returnvalue::OK;
}