refactor
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:
@ -568,11 +568,14 @@ auto remote_fuse_drive::utimens_impl(std::string api_path,
|
||||
#endif
|
||||
remote::file_time rtv[2U] = {0};
|
||||
if (tv != nullptr) {
|
||||
rtv[0U] = static_cast<remote::file_time>(
|
||||
tv[0U].tv_nsec + (tv[0U].tv_sec * utils::time::NANOS_PER_SECOND));
|
||||
|
||||
rtv[1U] = static_cast<remote::file_time>(
|
||||
tv[1U].tv_nsec + (tv[1U].tv_sec * utils::time::NANOS_PER_SECOND));
|
||||
const auto update_timespec = [](auto &dst, const auto &src) {
|
||||
dst = static_cast<remote::file_time>(
|
||||
src.tv_nsec +
|
||||
(src.tv_sec * static_cast<std::decay_t<decltype(src.tv_sec)>>(
|
||||
utils::time::NANOS_PER_SECOND)));
|
||||
};
|
||||
update_timespec(rtv[0U], tv[0U]);
|
||||
update_timespec(rtv[1U], tv[1U]);
|
||||
}
|
||||
|
||||
return utils::to_api_error(remote_instance_->fuse_utimens(
|
||||
|
Reference in New Issue
Block a user