mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 19:58:50 +00:00
backend: ignore val_len
when updating timestamps
This commit is contained in:
parent
a7575dc074
commit
3375674973
3 changed files with 2 additions and 5 deletions
|
@ -2614,7 +2614,6 @@ bookmark_set (
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & BOOKMARK_FLAG(SET_TIME)) {
|
if (flags & BOOKMARK_FLAG(SET_TIME)) {
|
||||||
debug_assert(val_len == 2);
|
|
||||||
// Without UTIME_NOW, it is safe to cast away the const qualifier.
|
// Without UTIME_NOW, it is safe to cast away the const qualifier.
|
||||||
struct timespec *times = (struct timespec *)val;
|
struct timespec *times = (struct timespec *)val;
|
||||||
if (unlikely(0 != update_node_ts(entry->node, times))) {
|
if (unlikely(0 != update_node_ts(entry->node, times))) {
|
||||||
|
|
|
@ -3615,8 +3615,6 @@ bookmark_set (
|
||||||
|
|
||||||
int attr_type = ATTR_IN_MOZBM_START;
|
int attr_type = ATTR_IN_MOZBM_START;
|
||||||
if (flags & BOOKMARK_FLAG(SET_TIME)) {
|
if (flags & BOOKMARK_FLAG(SET_TIME)) {
|
||||||
debug_assert(val_len == 2);
|
|
||||||
|
|
||||||
struct timespec const *times = val;
|
struct timespec const *times = val;
|
||||||
place_cols.last_visit_date = timespec_to_msecs(×[0]);
|
place_cols.last_visit_date = timespec_to_msecs(×[0]);
|
||||||
bm_cols.last_modified = timespec_to_msecs(×[1]);
|
bm_cols.last_modified = timespec_to_msecs(×[1]);
|
||||||
|
|
|
@ -387,7 +387,7 @@ bm_do_write (
|
||||||
fh->mtime,
|
fh->mtime,
|
||||||
};
|
};
|
||||||
uint32_t set_flags = BOOKMARK_FLAG(SET_TIME);
|
uint32_t set_flags = BOOKMARK_FLAG(SET_TIME);
|
||||||
status = BACKEND_CALL(bookmark_set, id, NULL, set_flags, times, 2);
|
status = BACKEND_CALL(bookmark_set, id, NULL, set_flags, times, 0);
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -1110,7 +1110,7 @@ bm_setattr (
|
||||||
if (is_tag) {
|
if (is_tag) {
|
||||||
set_flags |= BOOKMARKFS_BOOKMARK_TYPE(TAG);
|
set_flags |= BOOKMARKFS_BOOKMARK_TYPE(TAG);
|
||||||
}
|
}
|
||||||
int status = BACKEND_CALL(bookmark_set, id, NULL, set_flags, times, 2);
|
int status = BACKEND_CALL(bookmark_set, id, NULL, set_flags, times, 0);
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue