updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
This commit is contained in:
@ -163,7 +163,7 @@ auto fuse_drive::create_impl(std::string api_path, mode_t mode,
|
||||
{
|
||||
std::shared_ptr<i_open_file> open_file;
|
||||
if (is_create_op) {
|
||||
const auto now = utils::time::get_file_time_now();
|
||||
const auto now = utils::time::get_time_now();
|
||||
#if defined(__APPLE__)
|
||||
const auto osx_flags = static_cast<std::uint32_t>(file_info->flags);
|
||||
#else // !defined(__APPLE__)
|
||||
@ -614,7 +614,7 @@ auto fuse_drive::mkdir_impl(std::string api_path, mode_t mode) -> api_error {
|
||||
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,
|
||||
true, get_effective_gid(), "", mode, now,
|
||||
0U, 0U, 0U, "", get_effective_uid(), now);
|
||||
@ -1311,14 +1311,14 @@ auto fuse_drive::utimens_impl(std::string api_path,
|
||||
|
||||
meta.clear();
|
||||
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) {
|
||||
const auto val = tv[0U].tv_nsec + (tv[0U].tv_sec * NANOS_PER_SECOND);
|
||||
meta[META_ACCESSED] = std::to_string(val);
|
||||
}
|
||||
|
||||
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) {
|
||||
const auto val = tv[1U].tv_nsec + (tv[1U].tv_sec * NANOS_PER_SECOND);
|
||||
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_) {
|
||||
auto res = provider_.set_item_meta(
|
||||
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) {
|
||||
utils::error::raise_api_path_error(function_name, api_path, res,
|
||||
"failed to set accessed time");
|
||||
|
@ -827,7 +827,7 @@ auto remote_server::fuse_utimens(const char *path, const remote::file_time *tv,
|
||||
FILETIME *write_time_ptr = nullptr;
|
||||
|
||||
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 =
|
||||
static_cast<DWORD>((now >> 32U) & 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)) {
|
||||
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.dwLowDateTime = now & 0xFFFFFFFF;
|
||||
write_time_ptr = &write_time;
|
||||
|
@ -230,7 +230,7 @@ auto remote_winfsp_drive::Init(PVOID host) -> NTSTATUS {
|
||||
file_system_host->SetPersistentAcls(FALSE);
|
||||
file_system_host->SetPostCleanupWhenModifiedOnly(TRUE);
|
||||
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);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ VOID winfsp_drive::Cleanup(PVOID file_node, PVOID file_desc,
|
||||
|
||||
if ((flags & (FspCleanupSetLastAccessTime | FspCleanupSetLastWriteTime |
|
||||
FspCleanupSetChangeTime)) != 0U) {
|
||||
const auto now = utils::time::get_file_time_now();
|
||||
const auto now = utils::time::get_time_now();
|
||||
if ((flags & FspCleanupSetLastAccessTime) != 0U) {
|
||||
auto res = provider_.set_item_meta(api_path, META_ACCESSED,
|
||||
std::to_string(now));
|
||||
@ -310,7 +310,7 @@ auto winfsp_drive::Create(PWSTR file_name, UINT32 create_options,
|
||||
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(
|
||||
now, attributes, now, now, (attributes & FILE_ATTRIBUTE_DIRECTORY) != 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->SetPostCleanupWhenModifiedOnly(TRUE);
|
||||
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);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
@ -868,7 +868,7 @@ auto winfsp_drive::Read(PVOID /*file_node*/, PVOID file_desc, PVOID buffer,
|
||||
data.clear();
|
||||
auto res = provider_.set_item_meta(
|
||||
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) {
|
||||
utils::error::raise_api_path_error(
|
||||
function_name, api_path, res,
|
||||
|
@ -514,7 +514,7 @@ void file_manager::queue_upload(const std::string &api_path,
|
||||
.or_replace()
|
||||
.column_value("api_path", api_path)
|
||||
.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)
|
||||
.go();
|
||||
if (result.ok()) {
|
||||
|
@ -320,7 +320,7 @@ auto file_manager::open_file::native_operation(
|
||||
set_modified();
|
||||
|
||||
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(
|
||||
fsi_.api_path, {
|
||||
{META_CHANGED, now},
|
||||
@ -586,7 +586,7 @@ auto file_manager::open_file::write(std::uint64_t write_offset,
|
||||
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, {
|
||||
{META_CHANGED, now},
|
||||
{META_MODIFIED, now},
|
||||
|
@ -37,10 +37,10 @@ auto base_provider::create_api_file(std::string path, std::string key,
|
||||
api_file file{};
|
||||
file.api_path = utils::path::create_api_path(path);
|
||||
file.api_parent = utils::path::get_parent_api_path(file.api_path);
|
||||
file.accessed_date = utils::time::get_file_time_now();
|
||||
file.changed_date = utils::time::get_file_time_now();
|
||||
file.creation_date = utils::time::get_file_time_now();
|
||||
file.modified_date = utils::time::get_file_time_now();
|
||||
file.accessed_date = utils::time::get_time_now();
|
||||
file.changed_date = utils::time::get_time_now();
|
||||
file.creation_date = utils::time::get_time_now();
|
||||
file.modified_date = utils::time::get_time_now();
|
||||
file.key = key;
|
||||
file.file_size = size;
|
||||
return file;
|
||||
|
@ -392,7 +392,7 @@ auto s3_provider::get_file(const std::string &api_path,
|
||||
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_parent = utils::path::get_parent_api_path(file.api_path);
|
||||
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{};
|
||||
file.api_path = utils::path::create_api_path(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(
|
||||
node.node().select_node("LastModified").node().text().as_string());
|
||||
file.creation_date = file.changed_date;
|
||||
|
@ -462,8 +462,8 @@ auto reset_modified_time(const std::string &path) -> bool {
|
||||
|
||||
auto retry_delete_directory(const std::string &dir) -> bool {
|
||||
auto deleted = false;
|
||||
for (std::uint8_t i = 0U; not(deleted = remove_directory(dir)) && (i < 200U);
|
||||
i++) {
|
||||
for (std::uint8_t i = 0U;
|
||||
not(deleted = directory(dir).remove()) && (i < 200U); i++) {
|
||||
std::this_thread::sleep_for(10ms);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user