Просмотр исходного кода

org-persist--gc-expired-p: Fix expiry check

* lisp/org-persist.el (org-persist--gc-expired-p): Fix comparison when
expiry date is set to number of days.  The old code flipped the check
and treated all the recent entries as expired.
Ihor Radchenko 2 лет назад
Родитель
Сommit
1c54d75cca
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      lisp/org-persist.el

+ 1 - 1
lisp/org-persist.el

@@ -345,7 +345,7 @@ FORMAT and ARGS are passed to `message'."
      (`never nil)
      ((pred numberp)
       (when (plist-get ,collection :last-access)
-        (<= (float-time) (+ (plist-get ,collection :last-access) (* ,cnd 24 60 60)))))
+        (> (float-time) (+ (plist-get ,collection :last-access) (* ,cnd 24 60 60)))))
      ((pred functionp)
       (funcall ,cnd ,collection))
      (_ (error "org-persist: Unsupported expiry type %S" ,cnd))))