mirror of https://github.com/AxioDL/metaforce.git
Windows fixes
This commit is contained in:
parent
337e087182
commit
3e18e519ce
|
@ -10,6 +10,8 @@
|
|||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#include <termios.h>
|
||||
#else
|
||||
#include <conio.h>
|
||||
#endif
|
||||
|
||||
#include "hecl/Database.hpp"
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 57e5196e726a4a53d55057130554cac812a40a61
|
||||
Subproject commit a5056960ed063a213596b3745b67269693ed9021
|
|
@ -301,7 +301,8 @@ static inline int64_t FTell(FILE* fp)
|
|||
static inline int Rename(const SystemChar* oldpath, const SystemChar* newpath)
|
||||
{
|
||||
#if HECL_UCS2
|
||||
return _wrename(oldpath, newpath);
|
||||
//return _wrename(oldpath, newpath);
|
||||
return ReplaceFileW(newpath, oldpath, nullptr, 0, nullptr, nullptr) == 0;
|
||||
#else
|
||||
return rename(oldpath, newpath);
|
||||
#endif
|
||||
|
|
|
@ -186,7 +186,8 @@ bool Project::ConfigFile::unlockAndCommit()
|
|||
else
|
||||
{
|
||||
#if HECL_UCS2
|
||||
_wrename(newPath.c_str(), m_filepath.c_str());
|
||||
//_wrename(newPath.c_str(), m_filepath.c_str());
|
||||
ReplaceFileW(m_filepath.c_str(), newPath.c_str(), nullptr, 0, nullptr, nullptr);
|
||||
#else
|
||||
rename(newPath.c_str(), m_filepath.c_str());
|
||||
#endif
|
||||
|
@ -529,7 +530,10 @@ bool Project::packagePath(const ProjectPath& path, FProgress progress, bool fast
|
|||
}
|
||||
}
|
||||
|
||||
if (specEntry && (!m_lastPackageSpec || m_lastPackageSpec->getDataSpecEntry() != specEntry))
|
||||
if (!specEntry)
|
||||
LogModule.report(logvisor::Fatal, "No matching DataSpec");
|
||||
|
||||
if (!m_lastPackageSpec || m_lastPackageSpec->getDataSpecEntry() != specEntry)
|
||||
m_lastPackageSpec = std::unique_ptr<IDataSpec>(specEntry->m_factory(*this, DataSpecTool::Package));
|
||||
|
||||
if (m_lastPackageSpec->canPackage(path))
|
||||
|
|
Loading…
Reference in New Issue