Compare commits
2 Commits
0a747e7a62
...
1880c50fd8
Author | SHA1 | Date | |
---|---|---|---|
1880c50fd8 | |||
b8cb717772 |
@ -1,28 +1,27 @@
|
||||
set(BINUTILS_VERSION 2.44)
|
||||
set(BOOST2_MAJOR_VERSION 1)
|
||||
set(BOOST2_MINOR_VERSION 76)
|
||||
set(BOOST2_PATCH_VERSION 0)
|
||||
set(BOOST_MAJOR_VERSION 1)
|
||||
set(BOOST_MINOR_VERSION 88)
|
||||
set(BOOST_PATCH_VERSION 0)
|
||||
set(BOOST2_MAJOR_VERSION 1)
|
||||
set(BOOST2_MINOR_VERSION 76)
|
||||
set(BOOST2_PATCH_VERSION 0)
|
||||
set(CPP_HTTPLIB_VERSION 0.20.0)
|
||||
set(CURL2_VERSION 8_13_0)
|
||||
set(CURL_VERSION 8.13.0)
|
||||
set(EXPAT2_VERSION 2_7_1)
|
||||
set(CURL2_VERSION 8_13_0)
|
||||
set(EXPAT_VERSION 2.7.1)
|
||||
set(EXPAT2_VERSION 2_7_1)
|
||||
set(GCC_VERSION 14.2.0)
|
||||
set(GTEST_VERSION 1.16.0)
|
||||
set(ICU_VERSION 76-1)
|
||||
set(JSON_VERSION 3.12.0)
|
||||
set(LIBSODIUM_VERSION 1.0.20)
|
||||
set(MESA_VERSION 23.3.3)
|
||||
set(MINGW_VERSION 12.0.0)
|
||||
set(OPENSSL_VERSION 3.5.0)
|
||||
set(PKG_CONFIG_VERSION 0.29.2)
|
||||
set(PUGIXML_VERSION 1.15)
|
||||
set(ROCKSDB_VERSION 10.0.1)
|
||||
set(SPDLOG_VERSION 1.15.2)
|
||||
set(SQLITE2_VERSION 3.49.1)
|
||||
set(SQLITE_VERSION 3490100)
|
||||
set(SQLITE2_VERSION 3.49.1)
|
||||
set(STDUUID_VERSION 1.2.3)
|
||||
set(ZLIB_VERSION 1.3.1)
|
||||
|
@ -64,7 +64,7 @@ fuse_base::fuse_base(app_config &config) : config_(config) {
|
||||
fuse_ops_.truncate = fuse_base::truncate_;
|
||||
#if !defined(__APPLE__)
|
||||
fuse_ops_.statfs = fuse_base::statfs_;
|
||||
#endif // __APPLE__
|
||||
#endif // !defined(__APPLE__)
|
||||
fuse_ops_.unlink = fuse_base::unlink_;
|
||||
fuse_ops_.utimens = fuse_base::utimens_;
|
||||
fuse_ops_.write = fuse_base::write_;
|
||||
@ -117,7 +117,7 @@ auto fuse_base::chflags_(const char *path, uint32_t flags) -> int {
|
||||
return instance().chflags_impl(std::move(api_path), flags);
|
||||
});
|
||||
}
|
||||
#endif // __APPLE__
|
||||
#endif // defined(__APPLE__)
|
||||
|
||||
#if FUSE_USE_VERSION >= 30
|
||||
auto fuse_base::chmod_(const char *path, mode_t mode, struct fuse_file_info *fi)
|
||||
@ -129,7 +129,7 @@ auto fuse_base::chmod_(const char *path, mode_t mode, struct fuse_file_info *fi)
|
||||
return instance().chmod_impl(std::move(api_path), mode, fi);
|
||||
});
|
||||
}
|
||||
#else
|
||||
#else // FUSE_USE_VERSION < 30
|
||||
auto fuse_base::chmod_(const char *path, mode_t mode) -> int {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
@ -138,7 +138,7 @@ auto fuse_base::chmod_(const char *path, mode_t mode) -> int {
|
||||
return instance().chmod_impl(std::move(api_path), mode);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
#endif // FUSE_USE_VERSION >= 30
|
||||
|
||||
#if FUSE_USE_VERSION >= 30
|
||||
auto fuse_base::chown_(const char *path, uid_t uid, gid_t gid,
|
||||
@ -150,7 +150,7 @@ auto fuse_base::chown_(const char *path, uid_t uid, gid_t gid,
|
||||
return instance().chown_impl(std::move(api_path), uid, gid, fi);
|
||||
});
|
||||
}
|
||||
#else
|
||||
#else // FUSE_USE_VERSION < 30
|
||||
auto fuse_base::chown_(const char *path, uid_t uid, gid_t gid) -> int {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
@ -159,7 +159,7 @@ auto fuse_base::chown_(const char *path, uid_t uid, gid_t gid) -> int {
|
||||
return instance().chown_impl(std::move(api_path), uid, gid);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
#endif // FUSE_USE_VERSION >= 30
|
||||
|
||||
auto fuse_base::create_(const char *path, mode_t mode,
|
||||
struct fuse_file_info *fi) -> int {
|
||||
@ -187,12 +187,12 @@ void fuse_base::display_options(
|
||||
[[maybe_unused]] std::vector<const char *> args) {
|
||||
#if FUSE_USE_VERSION >= 30
|
||||
fuse_cmdline_help();
|
||||
#else
|
||||
#else // FUSE_USE_VERSION < 30
|
||||
struct fuse_operations fuse_ops{};
|
||||
fuse_main(args.size(),
|
||||
reinterpret_cast<char **>(const_cast<char **>(args.data())),
|
||||
&fuse_ops, nullptr);
|
||||
#endif
|
||||
#endif // FUSE_USE_VERSION >= 30
|
||||
|
||||
std::cout << std::endl;
|
||||
}
|
||||
@ -266,7 +266,7 @@ auto fuse_base::fgetattr_(const char *path, struct stat *st,
|
||||
return instance().fgetattr_impl(std::move(api_path), st, fi);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
#endif // FUSE_USE_VERSION < 30
|
||||
|
||||
#if defined(__APPLE__)
|
||||
auto fuse_base::fsetattr_x_(const char *path, struct setattr_x *attr,
|
||||
@ -278,7 +278,7 @@ auto fuse_base::fsetattr_x_(const char *path, struct setattr_x *attr,
|
||||
return instance().fsetattr_x_impl(std::move(api_path), attr, fi);
|
||||
});
|
||||
}
|
||||
#endif // __APPLE__
|
||||
#endif // defined(__APPLE__)
|
||||
|
||||
auto fuse_base::fsync_(const char *path, int datasync,
|
||||
struct fuse_file_info *fi) -> int {
|
||||
@ -300,7 +300,7 @@ auto fuse_base::ftruncate_(const char *path, off_t size,
|
||||
return instance().ftruncate_impl(std::move(api_path), size, fi);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
#endif // FUSE_USE_VERSION < 30
|
||||
|
||||
#if FUSE_USE_VERSION >= 30
|
||||
auto fuse_base::getattr_(const char *path, struct stat *st,
|
||||
@ -312,7 +312,7 @@ auto fuse_base::getattr_(const char *path, struct stat *st,
|
||||
return instance().getattr_impl(std::move(api_path), st, fi);
|
||||
});
|
||||
}
|
||||
#else
|
||||
#else // FUSE_USE_VERSION < 30
|
||||
auto fuse_base::getattr_(const char *path, struct stat *st) -> int {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
@ -321,7 +321,7 @@ auto fuse_base::getattr_(const char *path, struct stat *st) -> int {
|
||||
return instance().getattr_impl(std::move(api_path), st);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
#endif // FUSE_USE_VERSION >= 30
|
||||
|
||||
#if defined(__APPLE__)
|
||||
auto fuse_base::getxtimes_(const char *path, struct timespec *bkuptime,
|
||||
@ -333,7 +333,7 @@ auto fuse_base::getxtimes_(const char *path, struct timespec *bkuptime,
|
||||
return instance().getxtimes_impl(std::move(api_path), bkuptime, crtime);
|
||||
});
|
||||
}
|
||||
#endif // __APPLE__
|
||||
#endif // defined(__APPLE__)
|
||||
|
||||
#if FUSE_USE_VERSION >= 30
|
||||
auto fuse_base::init_(struct fuse_conn_info *conn, struct fuse_config *cfg)
|
||||
@ -344,14 +344,14 @@ auto fuse_base::init_(struct fuse_conn_info *conn, struct fuse_config *cfg)
|
||||
return instance().init_impl(conn, cfg);
|
||||
});
|
||||
}
|
||||
#else
|
||||
#else // FUSE_USE_VERSION < 30
|
||||
auto fuse_base::init_(struct fuse_conn_info *conn) -> void * {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
return execute_void_pointer_callback(
|
||||
function_name, [&]() -> void * { return instance().init_impl(conn); });
|
||||
}
|
||||
#endif
|
||||
#endif // FUSE_USE_VERSION >= 30
|
||||
|
||||
#if FUSE_USE_VERSION >= 30
|
||||
auto fuse_base::init_impl([[maybe_unused]] struct fuse_conn_info *conn,
|
||||
@ -413,9 +413,9 @@ auto fuse_base::mount(std::vector<std::string> args) -> int {
|
||||
struct fuse_cmdline_opts opts{};
|
||||
fuse_parse_cmdline(&fa, &opts);
|
||||
mount_location = opts.mountpoint;
|
||||
#else
|
||||
#else // FUSE_USE_VERSION < 30
|
||||
fuse_parse_cmdline(&fa, &mount_location, nullptr, nullptr);
|
||||
#endif
|
||||
#endif // FUSE_USE_VERSION >= 30
|
||||
|
||||
if (mount_location) {
|
||||
mount_location_ = mount_location;
|
||||
@ -427,7 +427,7 @@ auto fuse_base::mount(std::vector<std::string> args) -> int {
|
||||
|
||||
#if FUSE_USE_VERSION < 30
|
||||
umask(0);
|
||||
#endif
|
||||
#endif // FUSE_USE_VERSION < 30
|
||||
|
||||
if (not console_enabled_) {
|
||||
repertory::project_cleanup();
|
||||
@ -489,7 +489,7 @@ auto fuse_base::readdir_(const char *path, void *buf,
|
||||
offset, fi, flags);
|
||||
});
|
||||
}
|
||||
#else
|
||||
#else // FUSE_USE_VERSION < 30
|
||||
auto fuse_base::readdir_(const char *path, void *buf,
|
||||
fuse_fill_dir_t fuse_fill_dir, off_t offset,
|
||||
struct fuse_file_info *fi) -> int {
|
||||
@ -501,7 +501,7 @@ auto fuse_base::readdir_(const char *path, void *buf,
|
||||
offset, fi);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
#endif // FUSE_USE_VERSION >= 30
|
||||
|
||||
auto fuse_base::release_(const char *path, struct fuse_file_info *fi) -> int {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
@ -534,7 +534,7 @@ auto fuse_base::rename_(const char *from, const char *to, unsigned int flags)
|
||||
std::move(to_api_path), flags);
|
||||
});
|
||||
}
|
||||
#else
|
||||
#else // FUSE_USE_VERSION < 30
|
||||
auto fuse_base::rename_(const char *from, const char *to) -> int {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
@ -545,7 +545,7 @@ auto fuse_base::rename_(const char *from, const char *to) -> int {
|
||||
std::move(to_api_path));
|
||||
});
|
||||
}
|
||||
#endif
|
||||
#endif // FUSE_USE_VERSION >= 30
|
||||
|
||||
auto fuse_base::rmdir_(const char *path) -> int {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
@ -571,7 +571,7 @@ auto fuse_base::getxattr_(const char *path, const char *name, char *value,
|
||||
|
||||
return res == 0 ? attribute_size : res;
|
||||
}
|
||||
#else // __APPLE__
|
||||
#else // !defined(__APPLE__)
|
||||
auto fuse_base::getxattr_(const char *path, const char *name, char *value,
|
||||
size_t size) -> int {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
@ -585,7 +585,7 @@ auto fuse_base::getxattr_(const char *path, const char *name, char *value,
|
||||
|
||||
return res == 0 ? attribute_size : res;
|
||||
}
|
||||
#endif // __APPLE__
|
||||
#endif // defined(__APPLE__)
|
||||
|
||||
auto fuse_base::listxattr_(const char *path, char *buffer, size_t size) -> int {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
@ -737,7 +737,7 @@ auto fuse_base::setxattr_(const char *path, const char *name, const char *value,
|
||||
|
||||
return res;
|
||||
}
|
||||
#else // __APPLE__
|
||||
#else // !defined(__APPLE__)
|
||||
auto fuse_base::setxattr_(const char *path, const char *name, const char *value,
|
||||
size_t size, int flags) -> int {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
@ -753,8 +753,8 @@ auto fuse_base::setxattr_(const char *path, const char *name, const char *value,
|
||||
|
||||
return res;
|
||||
}
|
||||
#endif // __APPLE__
|
||||
#endif // HAS_SETXATTR
|
||||
#endif // defined(__APPLE__)
|
||||
#endif // defined(HAS_SETXATTR)
|
||||
|
||||
void fuse_base::shutdown() {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
@ -821,7 +821,7 @@ auto fuse_base::statfs_x_(const char *path, struct statfs *stbuf) -> int {
|
||||
return instance().statfs_x_impl(std::move(api_path), stbuf);
|
||||
});
|
||||
}
|
||||
#else // __APPLE__
|
||||
#else // !defined(__APPLE__)
|
||||
auto fuse_base::statfs_(const char *path, struct statvfs *stbuf) -> int {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
@ -830,7 +830,7 @@ auto fuse_base::statfs_(const char *path, struct statvfs *stbuf) -> int {
|
||||
return instance().statfs_impl(std::move(api_path), stbuf);
|
||||
});
|
||||
}
|
||||
#endif // __APPLE__
|
||||
#endif // defined(__APPLE__)
|
||||
|
||||
#if FUSE_USE_VERSION >= 30
|
||||
auto fuse_base::truncate_(const char *path, off_t size,
|
||||
@ -842,7 +842,7 @@ auto fuse_base::truncate_(const char *path, off_t size,
|
||||
return instance().truncate_impl(std::move(api_path), size, fi);
|
||||
});
|
||||
}
|
||||
#else
|
||||
#else // FUSE_USE_VERSION < 30
|
||||
auto fuse_base::truncate_(const char *path, off_t size) -> int {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
@ -851,7 +851,7 @@ auto fuse_base::truncate_(const char *path, off_t size) -> int {
|
||||
return instance().truncate_impl(std::move(api_path), size);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
#endif // FUSE_USE_VERSION >= 30
|
||||
|
||||
auto fuse_base::unlink_(const char *path) -> int {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
@ -865,13 +865,13 @@ auto fuse_base::unlink_(const char *path) -> int {
|
||||
auto fuse_base::unmount(const std::string &mount_location) -> int {
|
||||
#if defined(__APPLE__)
|
||||
const auto cmd = "umount \"" + mount_location + "\" >/dev/null 2>&1";
|
||||
#else
|
||||
#else // !defined(__APPLE__)
|
||||
#if FUSE_USE_VERSION >= 30
|
||||
const auto cmd = "fusermount3 -u \"" + mount_location + "\" >/dev/null 2>&1";
|
||||
#else
|
||||
#else // FUSE_USE_VERSION < 30
|
||||
const auto cmd = "fusermount -u \"" + mount_location + "\" >/dev/null 2>&1";
|
||||
#endif
|
||||
#endif
|
||||
#endif // FUSE_USE_VERSION >= 30
|
||||
#endif // defined(__APPLE__)
|
||||
|
||||
return system(cmd.c_str());
|
||||
}
|
||||
@ -886,7 +886,7 @@ auto fuse_base::utimens_(const char *path, const struct timespec tv[2],
|
||||
return instance().utimens_impl(std::move(api_path), tv, fi);
|
||||
});
|
||||
}
|
||||
#else
|
||||
#else // FUSE_USE_VERSION < 30
|
||||
auto fuse_base::utimens_(const char *path, const struct timespec tv[2]) -> int {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
@ -895,7 +895,7 @@ auto fuse_base::utimens_(const char *path, const struct timespec tv[2]) -> int {
|
||||
return instance().utimens_impl(std::move(api_path), tv);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
#endif // FUSE_USE_VERSION >= 30
|
||||
|
||||
auto fuse_base::write_(const char *path, const char *buffer, size_t write_size,
|
||||
off_t write_offset, struct fuse_file_info *fi) -> int {
|
||||
@ -914,4 +914,4 @@ auto fuse_base::write_(const char *path, const char *buffer, size_t write_size,
|
||||
}
|
||||
} // namespace repertory
|
||||
|
||||
#endif // _WIN32
|
||||
#endif // !defined(_WIN32)
|
||||
|
@ -1445,4 +1445,4 @@ void fuse_drive::update_accessed_time(const std::string &api_path) {
|
||||
}
|
||||
} // namespace repertory
|
||||
|
||||
#endif // _WIN32
|
||||
#endif // !defined(_WIN32)
|
||||
|
@ -35,8 +35,8 @@ auto fuse_drive_base::access_impl(std::string api_path, int mask) -> api_error {
|
||||
return check_access(api_path, mask);
|
||||
}
|
||||
|
||||
auto fuse_drive_base::check_access(const std::string &api_path,
|
||||
int mask) const -> api_error {
|
||||
auto fuse_drive_base::check_access(const std::string &api_path, int mask) const
|
||||
-> api_error {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
api_meta_map meta;
|
||||
@ -137,8 +137,9 @@ auto fuse_drive_base::check_and_perform(
|
||||
return action(meta);
|
||||
}
|
||||
|
||||
auto fuse_drive_base::check_open_flags(
|
||||
int flags, int mask, const api_error &fail_error) -> api_error {
|
||||
auto fuse_drive_base::check_open_flags(int flags, int mask,
|
||||
const api_error &fail_error)
|
||||
-> api_error {
|
||||
return (((flags & mask) == 0) ? api_error::success : fail_error);
|
||||
}
|
||||
|
||||
@ -195,8 +196,8 @@ auto fuse_drive_base::check_parent_access(const std::string &api_path,
|
||||
return ret;
|
||||
}
|
||||
|
||||
auto fuse_drive_base::check_readable(int flags,
|
||||
const api_error &fail_error) -> api_error {
|
||||
auto fuse_drive_base::check_readable(int flags, const api_error &fail_error)
|
||||
-> api_error {
|
||||
auto mode = (flags & O_ACCMODE);
|
||||
return ((mode == O_WRONLY) ? fail_error : api_error::success);
|
||||
}
|
||||
@ -254,13 +255,16 @@ auto fuse_drive_base::get_uid_from_meta(const api_meta_map &meta) -> uid_t {
|
||||
}
|
||||
|
||||
#if defined(__APPLE__)
|
||||
auto fuse_drive_base::parse_xattr_parameters(
|
||||
const char *name, const uint32_t &position, std::string &attribute_name,
|
||||
const std::string &api_path) -> api_error {
|
||||
auto fuse_drive_base::parse_xattr_parameters(const char *name,
|
||||
const uint32_t &position,
|
||||
std::string &attribute_name,
|
||||
const std::string &api_path)
|
||||
-> api_error {
|
||||
#else // !defined(__APPLE__)
|
||||
auto fuse_drive_base::parse_xattr_parameters(
|
||||
const char *name, std::string &attribute_name,
|
||||
const std::string &api_path) -> api_error {
|
||||
auto fuse_drive_base::parse_xattr_parameters(const char *name,
|
||||
std::string &attribute_name,
|
||||
const std::string &api_path)
|
||||
-> api_error {
|
||||
#endif // defined(__APPLE__)
|
||||
auto res = api_path.empty() ? api_error::bad_address : api_error::success;
|
||||
if (res != api_error::success) {
|
||||
@ -293,9 +297,11 @@ auto fuse_drive_base::parse_xattr_parameters(
|
||||
std::string &attribute_name, const std::string &api_path) -> api_error {
|
||||
auto res = parse_xattr_parameters(name, position, attribute_name, api_path);
|
||||
#else // !defined(__APPLE__)
|
||||
auto fuse_drive_base::parse_xattr_parameters(
|
||||
const char *name, const char *value, size_t size,
|
||||
std::string &attribute_name, const std::string &api_path) -> api_error {
|
||||
auto fuse_drive_base::parse_xattr_parameters(const char *name,
|
||||
const char *value, size_t size,
|
||||
std::string &attribute_name,
|
||||
const std::string &api_path)
|
||||
-> api_error {
|
||||
auto res = parse_xattr_parameters(name, attribute_name, api_path);
|
||||
#endif // defined(__APPLE__)
|
||||
if (res != api_error::success) {
|
||||
@ -361,4 +367,4 @@ void fuse_drive_base::set_timespec_from_meta(const api_meta_map &meta,
|
||||
}
|
||||
} // namespace repertory
|
||||
|
||||
#endif // _WIN32
|
||||
#endif // !defined(_WIN32)
|
||||
|
@ -604,4 +604,4 @@ auto remote_fuse_drive::write_impl(std::string api_path, const char *buffer,
|
||||
}
|
||||
} // namespace repertory::remote_fuse
|
||||
|
||||
#endif // _WIN32
|
||||
#endif // !defined(_WIN32)
|
||||
|
@ -18,7 +18,6 @@ PROJECT_VERSIONS[GTEST]="1.16.0"
|
||||
PROJECT_VERSIONS[ICU]="76-1"
|
||||
PROJECT_VERSIONS[JSON]="3.12.0"
|
||||
PROJECT_VERSIONS[LIBSODIUM]="1.0.20"
|
||||
PROJECT_VERSIONS[MESA]="23.3.3"
|
||||
PROJECT_VERSIONS[MINGW]="12.0.0"
|
||||
PROJECT_VERSIONS[OPENSSL]="3.5.0"
|
||||
PROJECT_VERSIONS[PKG_CONFIG]="0.29.2"
|
||||
|
@ -29,8 +29,8 @@ constexpr const auto file_type_count{3U};
|
||||
constexpr const auto file_type_count{2U};
|
||||
#endif
|
||||
|
||||
[[nodiscard]] auto create_file(auto idx, auto path,
|
||||
bool read_only = false) -> auto {
|
||||
[[nodiscard]] auto create_file(auto idx, auto path, bool read_only = false)
|
||||
-> auto {
|
||||
switch (idx) {
|
||||
case 0U:
|
||||
return repertory::utils::file::file::open_or_create_file(path, read_only);
|
||||
@ -47,8 +47,8 @@ constexpr const auto file_type_count{2U};
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]] auto open_file(auto idx, auto path,
|
||||
bool read_only = false) -> auto {
|
||||
[[nodiscard]] auto open_file(auto idx, auto path, bool read_only = false)
|
||||
-> auto {
|
||||
switch (idx) {
|
||||
case 0U:
|
||||
return repertory::utils::file::file::open_file(path, read_only);
|
||||
@ -370,6 +370,41 @@ TEST(utils_file, directory_exists_in_path) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(utils_file, directory_can_get_empty_directory_count) {
|
||||
auto &test_dir = test::generate_test_directory();
|
||||
EXPECT_EQ(0U, test_dir.count());
|
||||
EXPECT_EQ(0U, test_dir.count(false));
|
||||
}
|
||||
|
||||
TEST(utils_file, directory_can_get_empty_directory_count_recursively) {
|
||||
auto &test_dir = test::generate_test_directory();
|
||||
EXPECT_EQ(0U, test_dir.count(true));
|
||||
}
|
||||
|
||||
TEST(utils_file, directory_can_get_non_empty_directory_count) {
|
||||
auto &test_dir = test::generate_test_directory();
|
||||
auto sub_dir = test_dir.create_directory("sub_dir");
|
||||
EXPECT_TRUE(sub_dir != nullptr);
|
||||
if (sub_dir) {
|
||||
sub_dir->create_directory("sub_dir");
|
||||
|
||||
EXPECT_EQ(1U, test_dir.count());
|
||||
EXPECT_EQ(1U, test_dir.count(false));
|
||||
}
|
||||
}
|
||||
|
||||
TEST(utils_file, directory_can_get_non_empty_directory_count_recursively) {
|
||||
auto &test_dir = test::generate_test_directory();
|
||||
auto sub_dir = test_dir.create_directory("sub_dir");
|
||||
EXPECT_TRUE(sub_dir != nullptr);
|
||||
if (sub_dir) {
|
||||
sub_dir = sub_dir->create_directory("sub_dir");
|
||||
EXPECT_TRUE(sub_dir != nullptr);
|
||||
}
|
||||
|
||||
EXPECT_EQ(2U, test_dir.count(true));
|
||||
}
|
||||
|
||||
TEST(utils_file, file_exists_in_path) {
|
||||
auto &test_dir = test::generate_test_directory();
|
||||
EXPECT_FALSE(
|
||||
|
@ -153,9 +153,9 @@ String getBaseUri() {
|
||||
String? getSettingDescription(String settingPath) {
|
||||
switch (settingPath) {
|
||||
case 'ApiPassword':
|
||||
return "HTTP basic authentication password";
|
||||
return "HTTP authentication password";
|
||||
case 'ApiUser':
|
||||
return "HTTP basic authentication user";
|
||||
return "HTTP authentication user";
|
||||
case 'HostConfig.ApiPassword':
|
||||
return "RENTERD_API_PASSWORD";
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user