Skip to content

Commit

Permalink
check for crashes: support new (10.9) DiagnosticReport directory
Browse files Browse the repository at this point in the history
check only last 5 crashes to avoid incremental slowing down of boot process
  • Loading branch information
davidswelt committed Oct 30, 2013
1 parent 97a760e commit 94d6f63
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions aquamacs/src/site-lisp/aquamacs-bug.el
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ Prompts for bug subject. Leaves you in a mail buffer."
Offer to send a bug report." Offer to send a bug report."
(interactive) (interactive)
(protect (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 (mapc
(lambda (file) (lambda (file)
(when (file-newer-than-file-p file aquamacs-id-file) (when (file-newer-than-file-p file aquamacs-id-file)
Expand All @@ -120,12 +124,12 @@ generated crash report to us.




(report-aquamacs-bug (concat "Crash in " location) nil file))))) (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))) nil)))






(defun start-aquamacs-with-args (kill-session &rest args) (defun start-aquamacs-with-args (kill-session &rest args)
"Start Aquamacs with optional arguments. "Start Aquamacs with optional arguments.
Starts a new instance of Aquamacs with arguments args. Starts a new instance of Aquamacs with arguments args.
Expand Down

0 comments on commit 94d6f63

Please sign in to comment.