mirror of
https://github.com/libAthena/athena.git
synced 2025-12-09 13:38:03 +00:00
Various NX build fixes
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include "osx_largefilewrapper.h"
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
namespace athena::io
|
||||
{
|
||||
FileWriter::FileWriter(std::string_view filename, bool overwrite, bool globalErr)
|
||||
@@ -82,6 +84,10 @@ void FileWriter::close()
|
||||
m_fileHandle = NULL;
|
||||
|
||||
std::string tmpFilename = m_filename + '~';
|
||||
#ifdef __SWITCH__
|
||||
/* Due to Horizon not being a fully POSIX compatible OS, we need to make sure the file *does not* exist before attempting to rename */
|
||||
unlink(m_filename.c_str());
|
||||
#endif
|
||||
rename(tmpFilename.c_str(), m_filename.c_str());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user