Skip to content

Commit 598a093

Browse files
committed
PSMDB-810 explicitly close destination file to avoid error swallowing
1 parent bfc13f1 commit 598a093

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,8 @@ static void copy_file_size(const boost::filesystem::path& srcFile, const boost::
14911491
dst.write(bufptr, cnt);
14921492
fsize -= cnt;
14931493
}
1494+
1495+
dst.close();
14941496
}
14951497

14961498
Status WiredTigerKVEngine::_hotBackupPopulateLists(OperationContext* opCtx, const std::string& path, std::vector<DBTuple>& dbList, std::vector<FileTuple>& filesList) {

0 commit comments

Comments
 (0)