[FS] Fix file path oopsie

This commit is contained in:
wheremyfoodat 2023-01-26 01:26:04 +02:00
parent f68ddebf90
commit 4e04e58fbe
3 changed files with 56 additions and 14 deletions

View file

@ -52,7 +52,7 @@ struct FSPath {
FSPath() {}
FSPath(u32 type, std::vector<u8> vec) : type(type) {
FSPath(u32 type, const std::vector<u8>& vec) : type(type) {
switch (type) {
case PathType::Binary:
binary = std::move(vec);
@ -90,7 +90,7 @@ struct FileSession {
bool isOpen;
FileSession(ArchiveBase* archive, const FSPath& filePath, FILE* fd, bool isOpen = true) :
archive(archive), path(path), fd(fd), isOpen(isOpen) {}
archive(archive), path(filePath), fd(fd), isOpen(isOpen) {}
};
struct ArchiveSession {

View file

@ -18,4 +18,10 @@ public:
auto cxi = mem.getCXI();
return (cxi != nullptr && cxi->hasRomFS());
}
// Returns whether the cart has an ExeFS (All executable carts should have an ExeFS. This is just here to be safe)
bool hasExeFS() {
auto cxi = mem.getCXI();
return (cxi != nullptr && cxi->hasExeFS());
}
};