diff --git a/lib/DiscGCN.cpp b/lib/DiscGCN.cpp index bd61e8a..c5b0259 100644 --- a/lib/DiscGCN.cpp +++ b/lib/DiscGCN.cpp @@ -261,7 +261,7 @@ public: if (Stat(apploaderIn.c_str(), &apploaderStat)) { LogModule.report(logvisor::Error, _S("unable to stat %s"), apploaderIn.c_str()); - return -1; + return false; } /* Check Boot */ @@ -270,7 +270,7 @@ public: if (Stat(bootIn.c_str(), &bootStat)) { LogModule.report(logvisor::Error, _S("unable to stat %s"), bootIn.c_str()); - return -1; + return false; } /* Check BI2 */ @@ -279,7 +279,7 @@ public: if (Stat(bi2In.c_str(), &bi2Stat)) { LogModule.report(logvisor::Error, _S("unable to stat %s"), bi2In.c_str()); - return -1; + return false; } return _build( diff --git a/lib/FileIOFILE.cpp b/lib/FileIOFILE.cpp index b323dae..1163b7a 100644 --- a/lib/FileIOFILE.cpp +++ b/lib/FileIOFILE.cpp @@ -17,7 +17,7 @@ public: bool exists() { - FILE* fp = fopen(m_path.c_str(), "rb"); + FILE* fp = Fopen(m_path.c_str(), _S("rb")); if (!fp) return false; fclose(fp); @@ -26,7 +26,7 @@ public: uint64_t size() { - FILE* fp = fopen(m_path.c_str(), "rb"); + FILE* fp = Fopen(m_path.c_str(), _S("rb")); if (!fp) return 0; FSeek(fp, 0, SEEK_END); @@ -42,7 +42,7 @@ public: WriteStream(SystemStringView path, int64_t maxWriteSize, bool& err) : m_maxWriteSize(maxWriteSize) { - fp = fopen(path.data(), "wb"); + fp = Fopen(path.data(), _S("wb")); if (!fp) { LogModule.report(logvisor::Error, _S("unable to open '%s' for writing"), path.data()); @@ -52,11 +52,11 @@ public: WriteStream(SystemStringView path, uint64_t offset, int64_t maxWriteSize, bool& err) : m_maxWriteSize(maxWriteSize) { - fp = fopen(path.data(), "ab"); + fp = Fopen(path.data(), _S("ab")); if (!fp) goto FailLoc; fclose(fp); - fp = fopen(path.data(), "r+b"); + fp = Fopen(path.data(), _S("r+b")); if (!fp) goto FailLoc; FSeek(fp, offset, SEEK_SET); @@ -104,7 +104,7 @@ public: FILE* fp; ReadStream(SystemStringView path, bool& err) { - fp = fopen(path.data(), "rb"); + fp = Fopen(path.data(), _S("rb")); if (!fp) { err = true;