diff options
| author | Dan Engelbrecht <[email protected]> | 2025-03-31 10:24:39 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-03-31 10:24:39 +0200 |
| commit | fd2efb5af872a357dbc0f729f4101a330dcb4fda (patch) | |
| tree | 949e933156467113b861f4b0ca5862f9cdf10189 /src/zenvfs/vfsprovider.cpp | |
| parent | check file from local track state during download (#329) (diff) | |
| download | zen-fd2efb5af872a357dbc0f729f4101a330dcb4fda.tar.xz zen-fd2efb5af872a357dbc0f729f4101a330dcb4fda.zip | |
long filename support (#330)
- Bugfix: Long file paths now works correctly on Windows
Diffstat (limited to 'src/zenvfs/vfsprovider.cpp')
| -rw-r--r-- | src/zenvfs/vfsprovider.cpp | 13 |
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()); |