aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/basicfile.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-03-31 10:24:39 +0200
committerGitHub Enterprise <[email protected]>2025-03-31 10:24:39 +0200
commitfd2efb5af872a357dbc0f729f4101a330dcb4fda (patch)
tree949e933156467113b861f4b0ca5862f9cdf10189 /src/zencore/basicfile.cpp
parentcheck file from local track state during download (#329) (diff)
downloadzen-fd2efb5af872a357dbc0f729f4101a330dcb4fda.tar.xz
zen-fd2efb5af872a357dbc0f729f4101a330dcb4fda.zip
long filename support (#330)
- Bugfix: Long file paths now works correctly on Windows
Diffstat (limited to 'src/zencore/basicfile.cpp')
-rw-r--r--src/zencore/basicfile.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/zencore/basicfile.cpp b/src/zencore/basicfile.cpp
index a181bbd66..ea526399c 100644
--- a/src/zencore/basicfile.cpp
+++ b/src/zencore/basicfile.cpp
@@ -590,7 +590,7 @@ TemporaryFile::MoveTemporaryIntoPlace(std::filesystem::path FinalFileName, std::
// deleting the temporary file
BasicFile::Close();
- std::filesystem::rename(m_TempPath, FinalFileName, Ec);
+ RenameFile(m_TempPath, FinalFileName, Ec);
if (Ec)
{
@@ -984,9 +984,9 @@ TEST_CASE("TemporaryFile")
TmpFile.CreateTemporary(std::filesystem::current_path(), Ec);
CHECK(!Ec);
Path = TmpFile.GetPath();
- CHECK(std::filesystem::exists(Path));
+ CHECK(IsFile(Path));
}
- CHECK(std::filesystem::exists(Path) == false);
+ CHECK(IsFile(Path) == false);
}
SUBCASE("MoveIntoPlace")
@@ -997,11 +997,11 @@ TEST_CASE("TemporaryFile")
CHECK(!Ec);
std::filesystem::path TempPath = TmpFile.GetPath();
std::filesystem::path FinalPath = std::filesystem::current_path() / "final";
- CHECK(std::filesystem::exists(TempPath));
+ CHECK(IsFile(TempPath));
TmpFile.MoveTemporaryIntoPlace(FinalPath, Ec);
CHECK(!Ec);
- CHECK(std::filesystem::exists(TempPath) == false);
- CHECK(std::filesystem::exists(FinalPath));
+ CHECK(IsFile(TempPath) == false);
+ CHECK(IsFile(FinalPath));
}
}