+2015-04-01 Eric Abrahamsen <eric@ericabrahamsen.net>
+
+ * registry.el (registry-prune): Re-use `registry-full' in
+ `registry-prune'. It's a bit of redundant work, but safer.
+ Also ensure that target-size is an integer.
+
2015-03-31 Daiki Ueno <ueno@gnu.org>
* plstore.el (plstore--decrypt): Clear entry in
Returns the number of deleted entries."
(let ((size (registry-size db))
- (target-size (- (oref db max-size)
- (* (oref db max-size)
- (oref db prune-factor))))
+ (target-size
+ (floor (- (oref db max-size)
+ (* (oref db max-size)
+ (oref db prune-factor)))))
candidates)
- (if (> size (oref db max-size))
+ (if (registry-full db)
(progn
(setq candidates
(registry-collect-prune-candidates