updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit

This commit is contained in:
2024-08-22 14:55:56 -05:00
parent d5aa5c124c
commit 254578f4ab
16 changed files with 46 additions and 47 deletions

View File

@ -93,6 +93,7 @@ flarge
fontconfig_version fontconfig_version
freetype2_version freetype2_version
fsetattr_x fsetattr_x
futimens
getxtimes getxtimes
glapi glapi
gmock gmock

View File

@ -163,7 +163,7 @@ auto fuse_drive::create_impl(std::string api_path, mode_t mode,
{ {
std::shared_ptr<i_open_file> open_file; std::shared_ptr<i_open_file> open_file;
if (is_create_op) { if (is_create_op) {
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
#if defined(__APPLE__) #if defined(__APPLE__)
const auto osx_flags = static_cast<std::uint32_t>(file_info->flags); const auto osx_flags = static_cast<std::uint32_t>(file_info->flags);
#else // !defined(__APPLE__) #else // !defined(__APPLE__)
@ -614,7 +614,7 @@ auto fuse_drive::mkdir_impl(std::string api_path, mode_t mode) -> api_error {
return res; return res;
} }
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
auto meta = create_meta_attributes(now, FILE_ATTRIBUTE_DIRECTORY, now, now, auto meta = create_meta_attributes(now, FILE_ATTRIBUTE_DIRECTORY, now, now,
true, get_effective_gid(), "", mode, now, true, get_effective_gid(), "", mode, now,
0U, 0U, 0U, "", get_effective_uid(), now); 0U, 0U, 0U, "", get_effective_uid(), now);
@ -1311,14 +1311,14 @@ auto fuse_drive::utimens_impl(std::string api_path,
meta.clear(); meta.clear();
if ((tv == nullptr) || (tv[0U].tv_nsec == UTIME_NOW)) { if ((tv == nullptr) || (tv[0U].tv_nsec == UTIME_NOW)) {
meta[META_ACCESSED] = std::to_string(utils::time::get_file_time_now()); meta[META_ACCESSED] = std::to_string(utils::time::get_time_now());
} else if (tv[0U].tv_nsec != UTIME_OMIT) { } else if (tv[0U].tv_nsec != UTIME_OMIT) {
const auto val = tv[0U].tv_nsec + (tv[0U].tv_sec * NANOS_PER_SECOND); const auto val = tv[0U].tv_nsec + (tv[0U].tv_sec * NANOS_PER_SECOND);
meta[META_ACCESSED] = std::to_string(val); meta[META_ACCESSED] = std::to_string(val);
} }
if ((tv == nullptr) || (tv[1U].tv_nsec == UTIME_NOW)) { if ((tv == nullptr) || (tv[1U].tv_nsec == UTIME_NOW)) {
meta[META_MODIFIED] = std::to_string(utils::time::get_file_time_now()); meta[META_MODIFIED] = std::to_string(utils::time::get_time_now());
} else if (tv[1U].tv_nsec != UTIME_OMIT) { } else if (tv[1U].tv_nsec != UTIME_OMIT) {
const auto val = tv[1U].tv_nsec + (tv[1U].tv_sec * NANOS_PER_SECOND); const auto val = tv[1U].tv_nsec + (tv[1U].tv_sec * NANOS_PER_SECOND);
meta[META_MODIFIED] = std::to_string(val); meta[META_MODIFIED] = std::to_string(val);
@ -1370,7 +1370,7 @@ void fuse_drive::update_accessed_time(const std::string &api_path) {
if (atime_enabled_) { if (atime_enabled_) {
auto res = provider_.set_item_meta( auto res = provider_.set_item_meta(
api_path, META_ACCESSED, api_path, META_ACCESSED,
std::to_string(utils::time::get_file_time_now())); std::to_string(utils::time::get_time_now()));
if (res != api_error::success) { if (res != api_error::success) {
utils::error::raise_api_path_error(function_name, api_path, res, utils::error::raise_api_path_error(function_name, api_path, res,
"failed to set accessed time"); "failed to set accessed time");

View File

@ -827,7 +827,7 @@ auto remote_server::fuse_utimens(const char *path, const remote::file_time *tv,
FILETIME *write_time_ptr = nullptr; FILETIME *write_time_ptr = nullptr;
if ((tv[0U] == 0U) || (op0 == UTIME_NOW)) { if ((tv[0U] == 0U) || (op0 == UTIME_NOW)) {
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
access_time.dwHighDateTime = access_time.dwHighDateTime =
static_cast<DWORD>((now >> 32U) & 0xFFFFFFFF); static_cast<DWORD>((now >> 32U) & 0xFFFFFFFF);
access_time.dwLowDateTime = now & 0xFFFFFFFF; access_time.dwLowDateTime = now & 0xFFFFFFFF;
@ -838,7 +838,7 @@ auto remote_server::fuse_utimens(const char *path, const remote::file_time *tv,
} }
if ((tv[1U] == 0U) || (op1 == UTIME_NOW)) { if ((tv[1U] == 0U) || (op1 == UTIME_NOW)) {
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
write_time.dwHighDateTime = static_cast<DWORD>((now >> 32U) & 0xFFFFFFFF); write_time.dwHighDateTime = static_cast<DWORD>((now >> 32U) & 0xFFFFFFFF);
write_time.dwLowDateTime = now & 0xFFFFFFFF; write_time.dwLowDateTime = now & 0xFFFFFFFF;
write_time_ptr = &write_time; write_time_ptr = &write_time;

View File

@ -230,7 +230,7 @@ auto remote_winfsp_drive::Init(PVOID host) -> NTSTATUS {
file_system_host->SetPersistentAcls(FALSE); file_system_host->SetPersistentAcls(FALSE);
file_system_host->SetPostCleanupWhenModifiedOnly(TRUE); file_system_host->SetPostCleanupWhenModifiedOnly(TRUE);
file_system_host->SetPassQueryDirectoryPattern(FALSE); file_system_host->SetPassQueryDirectoryPattern(FALSE);
file_system_host->SetVolumeCreationTime(utils::time::get_file_time_now()); file_system_host->SetVolumeCreationTime(utils::time::get_time_now());
file_system_host->SetVolumeSerialNumber(0); file_system_host->SetVolumeSerialNumber(0);
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }

View File

@ -215,7 +215,7 @@ VOID winfsp_drive::Cleanup(PVOID file_node, PVOID file_desc,
if ((flags & (FspCleanupSetLastAccessTime | FspCleanupSetLastWriteTime | if ((flags & (FspCleanupSetLastAccessTime | FspCleanupSetLastWriteTime |
FspCleanupSetChangeTime)) != 0U) { FspCleanupSetChangeTime)) != 0U) {
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
if ((flags & FspCleanupSetLastAccessTime) != 0U) { if ((flags & FspCleanupSetLastAccessTime) != 0U) {
auto res = provider_.set_item_meta(api_path, META_ACCESSED, auto res = provider_.set_item_meta(api_path, META_ACCESSED,
std::to_string(now)); std::to_string(now));
@ -310,7 +310,7 @@ auto winfsp_drive::Create(PWSTR file_name, UINT32 create_options,
attributes = FILE_ATTRIBUTE_NORMAL; attributes = FILE_ATTRIBUTE_NORMAL;
} }
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
auto meta = create_meta_attributes( auto meta = create_meta_attributes(
now, attributes, now, now, (attributes & FILE_ATTRIBUTE_DIRECTORY) != 0U, now, attributes, now, now, (attributes & FILE_ATTRIBUTE_DIRECTORY) != 0U,
0U, "", 0U, now, 0U, 0U, 0U, 0U, "", 0U, now, 0U, 0U, 0U,
@ -579,7 +579,7 @@ auto winfsp_drive::Init(PVOID host) -> NTSTATUS {
file_system_host->SetPersistentAcls(FALSE); file_system_host->SetPersistentAcls(FALSE);
file_system_host->SetPostCleanupWhenModifiedOnly(TRUE); file_system_host->SetPostCleanupWhenModifiedOnly(TRUE);
file_system_host->SetPassQueryDirectoryPattern(FALSE); file_system_host->SetPassQueryDirectoryPattern(FALSE);
file_system_host->SetVolumeCreationTime(utils::time::get_file_time_now()); file_system_host->SetVolumeCreationTime(utils::time::get_time_now());
file_system_host->SetVolumeSerialNumber(0); file_system_host->SetVolumeSerialNumber(0);
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
@ -868,7 +868,7 @@ auto winfsp_drive::Read(PVOID /*file_node*/, PVOID file_desc, PVOID buffer,
data.clear(); data.clear();
auto res = provider_.set_item_meta( auto res = provider_.set_item_meta(
api_path, META_ACCESSED, api_path, META_ACCESSED,
std::to_string(utils::time::get_file_time_now())); std::to_string(utils::time::get_time_now()));
if (res != api_error::success) { if (res != api_error::success) {
utils::error::raise_api_path_error( utils::error::raise_api_path_error(
function_name, api_path, res, function_name, api_path, res,

View File

@ -514,7 +514,7 @@ void file_manager::queue_upload(const std::string &api_path,
.or_replace() .or_replace()
.column_value("api_path", api_path) .column_value("api_path", api_path)
.column_value("date_time", static_cast<std::int64_t>( .column_value("date_time", static_cast<std::int64_t>(
utils::time::get_file_time_now())) utils::time::get_time_now()))
.column_value("source_path", source_path) .column_value("source_path", source_path)
.go(); .go();
if (result.ok()) { if (result.ok()) {

View File

@ -320,7 +320,7 @@ auto file_manager::open_file::native_operation(
set_modified(); set_modified();
fsi_.size = new_file_size; fsi_.size = new_file_size;
const auto now = std::to_string(utils::time::get_file_time_now()); const auto now = std::to_string(utils::time::get_time_now());
res = provider_.set_item_meta( res = provider_.set_item_meta(
fsi_.api_path, { fsi_.api_path, {
{META_CHANGED, now}, {META_CHANGED, now},
@ -586,7 +586,7 @@ auto file_manager::open_file::write(std::uint64_t write_offset,
return set_api_error(res); return set_api_error(res);
} }
const auto now = std::to_string(utils::time::get_file_time_now()); const auto now = std::to_string(utils::time::get_time_now());
res = provider_.set_item_meta(fsi_.api_path, { res = provider_.set_item_meta(fsi_.api_path, {
{META_CHANGED, now}, {META_CHANGED, now},
{META_MODIFIED, now}, {META_MODIFIED, now},

View File

@ -37,10 +37,10 @@ auto base_provider::create_api_file(std::string path, std::string key,
api_file file{}; api_file file{};
file.api_path = utils::path::create_api_path(path); file.api_path = utils::path::create_api_path(path);
file.api_parent = utils::path::get_parent_api_path(file.api_path); file.api_parent = utils::path::get_parent_api_path(file.api_path);
file.accessed_date = utils::time::get_file_time_now(); file.accessed_date = utils::time::get_time_now();
file.changed_date = utils::time::get_file_time_now(); file.changed_date = utils::time::get_time_now();
file.creation_date = utils::time::get_file_time_now(); file.creation_date = utils::time::get_time_now();
file.modified_date = utils::time::get_file_time_now(); file.modified_date = utils::time::get_time_now();
file.key = key; file.key = key;
file.file_size = size; file.file_size = size;
return file; return file;

View File

@ -392,7 +392,7 @@ auto s3_provider::get_file(const std::string &api_path,
return res; return res;
} }
file.accessed_date = utils::time::get_file_time_now(); file.accessed_date = utils::time::get_time_now();
file.api_path = api_path; file.api_path = api_path;
file.api_parent = utils::path::get_parent_api_path(file.api_path); file.api_parent = utils::path::get_parent_api_path(file.api_path);
file.changed_date = utils::aws::format_time(result.last_modified); file.changed_date = utils::aws::format_time(result.last_modified);
@ -447,7 +447,7 @@ auto s3_provider::get_file_list(api_file_list &list) const -> api_error {
api_file file{}; api_file file{};
file.api_path = utils::path::create_api_path(api_path); file.api_path = utils::path::create_api_path(api_path);
file.api_parent = utils::path::get_parent_api_path(file.api_path); file.api_parent = utils::path::get_parent_api_path(file.api_path);
file.accessed_date = utils::time::get_file_time_now(); file.accessed_date = utils::time::get_time_now();
file.changed_date = utils::convert_api_date( file.changed_date = utils::convert_api_date(
node.node().select_node("LastModified").node().text().as_string()); node.node().select_node("LastModified").node().text().as_string());
file.creation_date = file.changed_date; file.creation_date = file.changed_date;

View File

@ -462,8 +462,8 @@ auto reset_modified_time(const std::string &path) -> bool {
auto retry_delete_directory(const std::string &dir) -> bool { auto retry_delete_directory(const std::string &dir) -> bool {
auto deleted = false; auto deleted = false;
for (std::uint8_t i = 0U; not(deleted = remove_directory(dir)) && (i < 200U); for (std::uint8_t i = 0U;
i++) { not(deleted = directory(dir).remove()) && (i < 200U); i++) {
std::this_thread::sleep_for(10ms); std::this_thread::sleep_for(10ms);
} }

View File

@ -68,10 +68,10 @@ public:
dir_item.size = 0; dir_item.size = 0;
dir_item.meta = { dir_item.meta = {
{META_ATTRIBUTES, "16"}, {META_ATTRIBUTES, "16"},
{META_MODIFIED, std::to_string(utils::time::get_file_time_now())}, {META_MODIFIED, std::to_string(utils::time::get_time_now())},
{META_WRITTEN, std::to_string(utils::time::get_file_time_now())}, {META_WRITTEN, std::to_string(utils::time::get_time_now())},
{META_ACCESSED, std::to_string(utils::time::get_file_time_now())}, {META_ACCESSED, std::to_string(utils::time::get_time_now())},
{META_CREATION, std::to_string(utils::time::get_file_time_now())}}; {META_CREATION, std::to_string(utils::time::get_time_now())}};
list.emplace_back(dir_item); list.emplace_back(dir_item);
dir_item.api_path = ".."; dir_item.api_path = "..";

View File

@ -57,10 +57,10 @@ public:
di.size = 0u; di.size = 0u;
di.meta = { di.meta = {
{META_ATTRIBUTES, "16"}, {META_ATTRIBUTES, "16"},
{META_MODIFIED, std::to_string(utils::time::get_file_time_now())}, {META_MODIFIED, std::to_string(utils::time::get_time_now())},
{META_WRITTEN, std::to_string(utils::time::get_file_time_now())}, {META_WRITTEN, std::to_string(utils::time::get_time_now())},
{META_ACCESSED, std::to_string(utils::time::get_file_time_now())}, {META_ACCESSED, std::to_string(utils::time::get_time_now())},
{META_CREATION, std::to_string(utils::time::get_file_time_now())}}; {META_CREATION, std::to_string(utils::time::get_time_now())}};
list.emplace_back(di); list.emplace_back(di);
di.api_path = ".."; di.api_path = "..";

View File

@ -117,7 +117,7 @@ TEST(file_manager, can_create_and_close_file) {
{ {
std::shared_ptr<i_open_file> f; std::shared_ptr<i_open_file> f;
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
auto meta = create_meta_attributes( auto meta = create_meta_attributes(
now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u,
now + 2u, false, 1, "key", 2, now + 3u, 3u, 4u, 0u, source_path, 10, now + 2u, false, 1, "key", 2, now + 3u, 3u, 4u, 0u, source_path, 10,
@ -232,7 +232,7 @@ TEST(file_manager, can_open_and_close_file) {
std::uint64_t handle{}; std::uint64_t handle{};
{ {
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
auto meta = create_meta_attributes( auto meta = create_meta_attributes(
now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u,
now + 2u, false, 1, "key", 2, now + 3u, 3u, 4u, 0u, source_path, 10, now + 2u, false, 1, "key", 2, now + 3u, 3u, 4u, 0u, source_path, 10,
@ -339,7 +339,7 @@ TEST(file_manager, can_open_and_close_multiple_handles_for_same_file) {
const auto source_path = utils::path::combine( const auto source_path = utils::path::combine(
cfg.get_cache_directory(), {utils::create_uuid_string()}); cfg.get_cache_directory(), {utils::create_uuid_string()});
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
auto meta = create_meta_attributes( auto meta = create_meta_attributes(
now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u,
now + 2u, false, 1, "key", 2, now + 3u, 3u, 4u, 0u, source_path, 10, now + 2u, false, 1, "key", 2, now + 3u, 3u, 4u, 0u, source_path, 10,
@ -419,7 +419,7 @@ TEST(file_manager, download_is_stored_after_write_if_partially_downloaded) {
event_capture ec({"download_stored"}, event_capture ec({"download_stored"},
{"file_upload_completed", "file_upload_queued"}); {"file_upload_completed", "file_upload_queued"});
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
auto meta = create_meta_attributes( auto meta = create_meta_attributes(
now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now + 2u, now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now + 2u,
false, 1, "key", 2, now + 3u, 3u, 4u, false, 1, "key", 2, now + 3u, 3u, 4u,
@ -580,7 +580,7 @@ TEST(file_manager, upload_occurs_after_write_if_fully_downloaded) {
}); });
event_capture ec({"download_end"}); event_capture ec({"download_end"});
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
auto meta = create_meta_attributes( auto meta = create_meta_attributes(
now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now + 2u, now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now + 2u,
false, 1, "key", 2, now + 3u, 3u, 4u, false, 1, "key", 2, now + 3u, 3u, 4u,
@ -689,7 +689,7 @@ TEST(file_manager, can_evict_file) {
const auto source_path = utils::path::combine( const auto source_path = utils::path::combine(
cfg.get_cache_directory(), {utils::create_uuid_string()}); cfg.get_cache_directory(), {utils::create_uuid_string()});
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
auto meta = create_meta_attributes( auto meta = create_meta_attributes(
now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now + 2u, now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now + 2u,
@ -955,7 +955,7 @@ TEST(file_manager, evict_file_fails_if_file_is_uploading) {
const auto source_path = utils::path::combine( const auto source_path = utils::path::combine(
cfg.get_cache_directory(), {utils::create_uuid_string()}); cfg.get_cache_directory(), {utils::create_uuid_string()});
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
auto meta = create_meta_attributes( auto meta = create_meta_attributes(
now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now + 2u, now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now + 2u,
@ -1188,7 +1188,7 @@ TEST(file_manager, file_is_not_opened_if_provider_create_file_fails) {
EXPECT_CALL(mp, is_direct_only()).WillRepeatedly(Return(false)); EXPECT_CALL(mp, is_direct_only()).WillRepeatedly(Return(false));
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
auto meta = create_meta_attributes( auto meta = create_meta_attributes(
now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now + 2u, now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now + 2u,
false, 1, "", 2, now + 3u, 3u, 4u, 0u, "/test_create.src", 10, false, 1, "", 2, now + 3u, 3u, 4u, 0u, "/test_create.src", 10,
@ -1740,7 +1740,7 @@ TEST(file_manager, file_is_closed_after_download_timeout) {
ee.get_api_path().get<std::string>().c_str()); ee.get_api_path().get<std::string>().c_str());
}); });
const auto now = utils::time::get_file_time_now(); const auto now = utils::time::get_time_now();
auto meta = create_meta_attributes( auto meta = create_meta_attributes(
now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now + 2u, now, FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE, now + 1u, now + 2u,
false, 1, "key", 2, now + 3u, 3u, 4u, false, 1, "key", 2, now + 3u, 3u, 4u,

View File

@ -57,7 +57,7 @@ const auto check_forced_dirs = [](const repertory::directory_item_list &list) {
const auto create_directory = [](repertory::i_provider &provider, const auto create_directory = [](repertory::i_provider &provider,
const std::string &api_path) { const std::string &api_path) {
auto date = repertory::utils::time::get_file_time_now(); auto date = repertory::utils::time::get_time_now();
auto meta = repertory::create_meta_attributes( auto meta = repertory::create_meta_attributes(
date, 1U, date + 1U, date + 2U, true, getgid(), "", 0700, date + 3U, 2U, date, 1U, date + 1U, date + 2U, true, getgid(), "", 0700, date + 3U, 2U,
3U, 0U, api_path + "_src", getuid(), date + 4U); 3U, 0U, api_path + "_src", getuid(), date + 4U);
@ -109,7 +109,7 @@ const auto create_file = [](repertory::i_provider &provider,
const std::string &api_path) { const std::string &api_path) {
auto source_path = repertory::test::generate_test_file_name("providers_test"); auto source_path = repertory::test::generate_test_file_name("providers_test");
auto date = repertory::utils::time::get_file_time_now(); auto date = repertory::utils::time::get_time_now();
auto meta = repertory::create_meta_attributes( auto meta = repertory::create_meta_attributes(
date, 1U, date + 1U, date + 2U, false, getgid(), "", 0700, date + 3U, 2U, date, 1U, date + 1U, date + 2U, false, getgid(), "", 0700, date + 3U, 2U,
3U, 0U, source_path, getuid(), date + 4U); 3U, 0U, source_path, getuid(), date + 4U);

View File

@ -687,7 +687,7 @@ static void setbkuptime_test(repertory::remote_fuse::remote_client &client) {
if (ret == 0) { if (ret == 0) {
EXPECT_EQ(0, client.fuse_release(api_path.c_str(), handle)); EXPECT_EQ(0, client.fuse_release(api_path.c_str(), handle));
remote::file_time ts = utils::time::get_file_time_now(); remote::file_time ts = utils::time::get_time_now();
#if defined(_WIN32) #if defined(_WIN32)
EXPECT_EQ(NOT_IMPLEMENTED, client.fuse_setbkuptime(api_path.c_str(), ts)); EXPECT_EQ(NOT_IMPLEMENTED, client.fuse_setbkuptime(api_path.c_str(), ts));
#else #else
@ -712,7 +712,7 @@ static void setchgtime_test(repertory::remote_fuse::remote_client &client) {
if (ret == 0) { if (ret == 0) {
EXPECT_EQ(0, client.fuse_release(api_path.c_str(), handle)); EXPECT_EQ(0, client.fuse_release(api_path.c_str(), handle));
remote::file_time ts = utils::time::get_file_time_now(); remote::file_time ts = utils::time::get_time_now();
#if defined(_WIN32) #if defined(_WIN32)
EXPECT_EQ(NOT_IMPLEMENTED, client.fuse_setchgtime(api_path.c_str(), ts)); EXPECT_EQ(NOT_IMPLEMENTED, client.fuse_setchgtime(api_path.c_str(), ts));
#else #else
@ -737,7 +737,7 @@ static void setcrtime_test(repertory::remote_fuse::remote_client &client) {
if (ret == 0) { if (ret == 0) {
EXPECT_EQ(0, client.fuse_release(api_path.c_str(), handle)); EXPECT_EQ(0, client.fuse_release(api_path.c_str(), handle));
remote::file_time ts = utils::time::get_file_time_now(); remote::file_time ts = utils::time::get_time_now();
#if defined(_WIN32) #if defined(_WIN32)
EXPECT_EQ(NOT_IMPLEMENTED, client.fuse_setcrtime(api_path.c_str(), ts)); EXPECT_EQ(NOT_IMPLEMENTED, client.fuse_setcrtime(api_path.c_str(), ts));
#else #else

View File

@ -46,8 +46,6 @@ filetime_to_unix_time(const FILETIME &file_time) -> std::uint64_t;
} }
#endif // defined(PROJECT_ENABLE_SPDLOG) || defined(PROJECT_ENABLE_FMT) #endif // defined(PROJECT_ENABLE_SPDLOG) || defined(PROJECT_ENABLE_FMT)
[[nodiscard]] auto get_file_time_now() -> std::uint64_t;
void get_local_time_now(struct tm &local_time); void get_local_time_now(struct tm &local_time);
[[nodiscard]] auto get_time_now() -> std::uint64_t; [[nodiscard]] auto get_time_now() -> std::uint64_t;