diff --git a/BeefySysLib/platform/win/Platform.cpp b/BeefySysLib/platform/win/Platform.cpp index 70ccb986..ac306d16 100644 --- a/BeefySysLib/platform/win/Platform.cpp +++ b/BeefySysLib/platform/win/Platform.cpp @@ -2727,11 +2727,8 @@ BFP_EXPORT BfpFile* BFP_CALLTYPE BfpFile_Create(const char* path, BfpFileCreateK creationDisposition = CREATE_ALWAYS; } else if (createKind == BfpFileCreateKind_CreateIfNotExists) - { - if ((createFlags & BfpFileCreateFlag_Append) != 0) - creationDisposition = CREATE_NEW; - else - creationDisposition = TRUNCATE_EXISTING; + { + creationDisposition = CREATE_NEW; } else { diff --git a/IDEHelper/NetManager.cpp b/IDEHelper/NetManager.cpp index 9f68e911..ccfbf857 100644 --- a/IDEHelper/NetManager.cpp +++ b/IDEHelper/NetManager.cpp @@ -43,7 +43,7 @@ static size_t WriteMemoryCallback(void* contents, size_t size, size_t nmemb, voi if (!netRequest->mOutFile.IsOpen()) { RecursiveCreateDirectory(GetFileDir(netRequest->mOutPath)); - if (!netRequest->mOutFile.Open(netRequest->mOutTempPath, "wb")) + if (!netRequest->mOutFile.Open(netRequest->mOutTempPath, BfpFileCreateKind_CreateAlways, BfpFileCreateFlag_Write)) { netRequest->Fail(StrFormat("Failed to create file '%s'", netRequest->mOutTempPath.c_str())); return 0; diff --git a/IDEHelper/NetManager.h b/IDEHelper/NetManager.h index c52b0904..99c98993 100644 --- a/IDEHelper/NetManager.h +++ b/IDEHelper/NetManager.h @@ -29,7 +29,7 @@ public: String mURL; String mOutPath; String mOutTempPath; - FileStream mOutFile; + SysFileStream mOutFile; #ifdef BF_CURL CURL* mCURL; CURLM* mCURLMulti;