emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/disk-usage 64750a9 3/4: Catch nil DIRECTORY in DISK-USA


From: Pierre Neidhardt
Subject: [elpa] externals/disk-usage 64750a9 3/4: Catch nil DIRECTORY in DISK-USAGE
Date: Sat, 2 Mar 2019 08:51:42 -0500 (EST)

branch: externals/disk-usage
commit 64750a9de114332ff04a97114522e40873d19e3b
Author: Pierre Neidhardt <address@hidden>
Commit: Pierre Neidhardt <address@hidden>

    Catch nil DIRECTORY in DISK-USAGE
---
 disk-usage.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/disk-usage.el b/disk-usage.el
index 6b8590f..8312ba0 100644
--- a/disk-usage.el
+++ b/disk-usage.el
@@ -341,6 +341,8 @@ It takes the directory to scan as argument."
   (let ((size (unless current-prefix-arg
                 (gethash path disk-usage--cache))))
     (unless size
+      ;; TODO: Add progress "bar"?  But can we get progress for "du"?
+      ;; Maybe just print progress when using 
`disk-usage-directory-size-with-emacs'.
       (message "Computing disk usage for %S..." path)
       (setq size (funcall disk-usage-directory-size-function path))
       (puthash path size disk-usage--cache))
@@ -533,7 +535,7 @@ Also see `disk-usage-by-types-mode'."
   "Display listing of files in DIRECTORY with their size.
 If DIRECTORY is nil, use current directory."
   (interactive "D")
-  (unless (file-accessible-directory-p directory)
+  (unless (and (stringp directory) (file-accessible-directory-p directory))
     (error "Directory cannot be opened: %S" directory))
   (unless disk-usage--cache
     (setq disk-usage--cache (make-hash-table :test #'equal)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]