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