diff --git a/.cspell/words.txt b/.cspell/words.txt index a26805ad..c4eef0a0 100644 --- a/.cspell/words.txt +++ b/.cspell/words.txt @@ -177,6 +177,7 @@ strequal uring userenv utimens_impl +utimensat vorbis_version waggressive wall diff --git a/repertory/librepertory/src/drives/fuse/fuse_drive.cpp b/repertory/librepertory/src/drives/fuse/fuse_drive.cpp index 1e342063..7e9db611 100644 --- a/repertory/librepertory/src/drives/fuse/fuse_drive.cpp +++ b/repertory/librepertory/src/drives/fuse/fuse_drive.cpp @@ -1315,7 +1315,10 @@ auto fuse_drive::utimens_impl(std::string api_path, std::string attr) { if ((tv == nullptr) || (src.tv_nsec == UTIME_NOW)) { meta[attr] = std::to_string(utils::time::get_time_now()); - } else if (src.tv_nsec != UTIME_OMIT) { + return; + } + + if (src.tv_nsec != UTIME_OMIT) { meta[attr] = std::to_string( src.tv_nsec + (src.tv_sec * static_cast>( diff --git a/repertory/librepertory/src/drives/fuse/remotefuse/remote_server.cpp b/repertory/librepertory/src/drives/fuse/remotefuse/remote_server.cpp index 4403f8f2..ba3aa8d6 100644 --- a/repertory/librepertory/src/drives/fuse/remotefuse/remote_server.cpp +++ b/repertory/librepertory/src/drives/fuse/remotefuse/remote_server.cpp @@ -1010,10 +1010,11 @@ auto remote_server::fuse_utimens(const char *path, const remote::file_time *tv, if ((op == UTIME_NOW) || (op == UTIME_OMIT)) { dst.tv_nsec = static_cast(op); dst.tv_sec = 0; - } else { - dst.tv_nsec = static_cast(src % utils::time::NANOS_PER_SECOND); - dst.tv_sec = static_cast(src / utils::time::NANOS_PER_SECOND); + return; } + + dst.tv_nsec = static_cast(src % utils::time::NANOS_PER_SECOND); + dst.tv_sec = static_cast(src / utils::time::NANOS_PER_SECOND); }; process_timespec(op0, tv[0U], tv2[0U]); @@ -1768,7 +1769,7 @@ auto remote_server::update_to_windows_format(json &item) -> json & { if (item["meta"][META_WRITTEN].empty() || (item["meta"][META_WRITTEN].get() == "0") || (item["meta"][META_WRITTEN].get() == - std::to_string(WIN32_TIME_CONVERSION))) { + std::to_string(utils::time::WIN32_TIME_CONVERSION))) { drive_.set_item_meta(api_path, META_WRITTEN, item["meta"][META_MODIFIED].get()); item["meta"][META_WRITTEN] = item["meta"][META_MODIFIED];