aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver-test/zenserver-test.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/zenserver-test/zenserver-test.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/zenserver-test/zenserver-test.cpp')
-rw-r--r--src/zenserver-test/zenserver-test.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/zenserver-test/zenserver-test.cpp b/src/zenserver-test/zenserver-test.cpp
index 027a35998..78a735ea0 100644
--- a/src/zenserver-test/zenserver-test.cpp
+++ b/src/zenserver-test/zenserver-test.cpp
@@ -3306,18 +3306,18 @@ GenerateFolderContent(const std::filesystem::path& RootPath)
std::filesystem::path EmptyFolder(RootPath / "empty_folder");
std::filesystem::path FirstFolder(RootPath / "first_folder");
- std::filesystem::create_directory(FirstFolder);
+ CreateDirectories(FirstFolder);
Result.push_back(std::make_pair(FirstFolder / "first_folder_blob1.bin", CreateRandomBlob(22)));
Result.push_back(std::make_pair(FirstFolder / "first_folder_blob2.bin", CreateRandomBlob(122)));
std::filesystem::path SecondFolder(RootPath / "second_folder");
- std::filesystem::create_directory(SecondFolder);
+ CreateDirectories(SecondFolder);
Result.push_back(std::make_pair(SecondFolder / "second_folder_blob1.bin", CreateRandomBlob(522)));
Result.push_back(std::make_pair(SecondFolder / "second_folder_blob2.bin", CreateRandomBlob(122)));
Result.push_back(std::make_pair(SecondFolder / "second_folder_blob3.bin", CreateRandomBlob(225)));
std::filesystem::path SecondFolderChild(SecondFolder / "child_in_second");
- std::filesystem::create_directory(SecondFolderChild);
+ CreateDirectories(SecondFolderChild);
Result.push_back(std::make_pair(SecondFolderChild / "second_child_folder_blob1.bin", CreateRandomBlob(622)));
for (const auto& It : Result)
@@ -3473,7 +3473,7 @@ TEST_CASE("workspaces.create")
while (true)
{
std::error_code Ec;
- std::filesystem::remove_all(Root2Path / Share2Path, Ec);
+ DeleteDirectories(Root2Path / Share2Path, Ec);
if (!Ec)
break;
}
@@ -3630,7 +3630,7 @@ TEST_CASE("workspaces.lifetimes")
}
// Wipe system config
- std::filesystem::remove_all(SystemRootPath);
+ DeleteDirectories(SystemRootPath);
// Restart
@@ -3696,8 +3696,8 @@ TEST_CASE("workspaces.share")
uint64_t Size = FileObject["size"sv].AsUInt64();
std::u8string_view Path = FileObject["clientpath"sv].AsU8String();
std::filesystem::path AbsFilePath = SharePath / Path;
- CHECK(std::filesystem::is_regular_file(AbsFilePath));
- CHECK(std::filesystem::file_size(AbsFilePath) == Size);
+ CHECK(IsFile(AbsFilePath));
+ CHECK(FileSizeFromPath(AbsFilePath) == Size);
Files.insert_or_assign(ChunkId, std::make_pair(AbsFilePath, Size));
}
}
@@ -3720,7 +3720,7 @@ TEST_CASE("workspaces.share")
CHECK(ChunkId != Oid::Zero);
std::u8string_view Path = FileObject["clientpath"sv].AsU8String();
std::filesystem::path AbsFilePath = SharePath / Path;
- CHECK(std::filesystem::is_regular_file(AbsFilePath));
+ CHECK(IsFile(AbsFilePath));
}
}
}
@@ -3740,7 +3740,7 @@ TEST_CASE("workspaces.share")
CHECK(ChunkId != Oid::Zero);
std::u8string_view Path = FileObject["clientpath"sv].AsU8String();
std::filesystem::path AbsFilePath = SharePath / Path;
- CHECK(std::filesystem::is_regular_file(AbsFilePath));
+ CHECK(IsFile(AbsFilePath));
}
}