aboutsummaryrefslogtreecommitdiff
path: root/src/zenvfs/vfsprovider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenvfs/vfsprovider.cpp')
-rw-r--r--src/zenvfs/vfsprovider.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/zenvfs/vfsprovider.cpp b/src/zenvfs/vfsprovider.cpp
index a3cfe9d15..9cec5372a 100644
--- a/src/zenvfs/vfsprovider.cpp
+++ b/src/zenvfs/vfsprovider.cpp
@@ -373,13 +373,12 @@ VfsProvider::Initialize()
std::filesystem::path ManifestPath = Root / ".zen_vfs";
bool HaveManifest = false;
- if (std::filesystem::exists(Root))
+ if (IsFile(Root))
+ {
+ throw std::runtime_error("specified VFS root exists but is not a directory");
+ }
+ if (IsDir(Root))
{
- if (!std::filesystem::is_directory(Root))
- {
- throw std::runtime_error("specified VFS root exists but is not a directory");
- }
-
std::error_code Ec;
m_RootPath = WideToUtf8(CanonicalPath(Root, Ec).c_str());
@@ -388,7 +387,7 @@ VfsProvider::Initialize()
throw std::system_error(Ec);
}
- if (std::filesystem::exists(ManifestPath))
+ if (IsFile(ManifestPath))
{
FileContents ManifestData = zen::ReadFile(ManifestPath);
CbObject Manifest = LoadCompactBinaryObject(ManifestData.Flatten());