https://git.reactos.org/?p=reactos.git;a=commitdiff;h=af7456a1e457570c12b93…
commit af7456a1e457570c12b933b7b1571a33205a3ae6
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Thu Sep 19 15:36:18 2019 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Thu Sep 19 15:36:18 2019 +0200
[CABMAN] Third addendum to 7afc888: Also use the the old code in the Trucate() method
on Linux
---
sdk/tools/cabman/CCFDATAStorage.cxx | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sdk/tools/cabman/CCFDATAStorage.cxx b/sdk/tools/cabman/CCFDATAStorage.cxx
index eecb6b5b4d6..b1790791c0b 100644
--- a/sdk/tools/cabman/CCFDATAStorage.cxx
+++ b/sdk/tools/cabman/CCFDATAStorage.cxx
@@ -121,7 +121,11 @@ ULONG CCFDATAStorage::Destroy()
ULONG CCFDATAStorage::Truncate()
{
fclose(FileHandle);
+#if defined(_WIN32)
FileHandle = fopen(FullName, "w+b");
+#else
+ FileHandle = tmpfile();
+#endif
if (FileHandle == NULL)
{
DPRINT(MID_TRACE, ("ERROR '%i'.\n", errno));