Permalink
Browse files

check for crashes: support new (10.9) DiagnosticReport directory

check only last 5 crashes to avoid incremental slowing down of boot process
  • Loading branch information...
1 parent 97a760e commit 94d6f634b735eb2d763e7423db2dddbc210c55af @davidswelt committed Oct 30, 2013
Showing with 8 additions and 4 deletions.
  1. +8 −4 aquamacs/src/site-lisp/aquamacs-bug.el
@@ -106,7 +106,11 @@ Prompts for bug subject. Leaves you in a mail buffer."
Offer to send a bug report."
(interactive)
(protect
- (let ((last-nonmenu-event nil))
+ (let* ((logfiles (append
+ (directory-files "~/Library/Logs/CrashReporter" t "^Aquamacs.*")
+ (directory-files "~/Library/Logs/DiagnosticReports" t "^Aquamacs.*.crash$")))
+ (ln (length logfiles))
+ (last-nonmenu-event nil))
(mapc
(lambda (file)
(when (file-newer-than-file-p file aquamacs-id-file)
@@ -120,12 +124,12 @@ generated crash report to us.
(report-aquamacs-bug (concat "Crash in " location) nil file)))))
- (directory-files "~/Library/Logs/CrashReporter" t "Aquamacs.*"))
+ (if (> ln 6)
+ (nthcdr (- (length logfiles) 5) logfiles)
+ logfiles))
nil)))
-
-
(defun start-aquamacs-with-args (kill-session &rest args)
"Start Aquamacs with optional arguments.
Starts a new instance of Aquamacs with arguments args.

0 comments on commit 94d6f63

Please sign in to comment.