Io: Simulate VFAT bug only when simulating FAT32.

And cleanup flag handling a bit.
This commit is contained in:
Unknown W. Brackets committed 2020-05-21 18:57:46 -07:00
1 parent 51db9f0f85
commit 67416e5919
10 files changed
+34 -23

No files matched your search

+4 -4
View File
@@ -85,7 +85,7 @@ struct DirectoryFileHandle {
class DirectoryFileSystem : public IFileSystem {
public:
DirectoryFileSystem(IHandleAllocator *_hAlloc, std::string _basePath, int _flags = 0);
DirectoryFileSystem(IHandleAllocator *_hAlloc, std::string _basePath, FileSystemFlags _flags = FileSystemFlags::NONE);
~DirectoryFileSystem();
void CloseAll();
@@ -109,7 +109,7 @@ public:
int RenameFile(const std::string &from, const std::string &to) override;
bool RemoveFile(const std::string &filename) override;
bool GetHostPath(const std::string &inpath, std::string &outpath) override;
int Flags() override { return flags; }
FileSystemFlags Flags() override { return flags; }
u64 FreeSpace(const std::string &path) override;
private:
@@ -123,7 +123,7 @@ private:
EntryMap entries;
std::string basePath;
IHandleAllocator *hAlloc;
int flags;
FileSystemFlags flags;
// In case of Windows: Translate slashes, etc.
std::string GetLocalPath(std::string localpath);
};
@@ -154,7 +154,7 @@ public:
int RenameFile(const std::string &from, const std::string &to) override;
bool RemoveFile(const std::string &filename) override;
bool GetHostPath(const std::string &inpath, std::string &outpath) override;
int Flags() override { return 0; }
FileSystemFlags Flags() override { return FileSystemFlags::NONE; }
u64 FreeSpace(const std::string &path) override { return 0; }
private: