aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--projectile.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/projectile.el b/projectile.el
index e7f84bf..ff68cb7 100644
--- a/projectile.el
+++ b/projectile.el
@@ -2729,7 +2729,8 @@ Parameters MODE VARIABLE VALUE are passed directly to
(let ((default-directory (projectile-project-root))
(mtimes (make-hash-table :test 'equal :size (length files))))
(dolist (file files)
- (puthash file (file-attribute-modification-time (file-attributes file)) mtimes))
+ (let ((attrs (file-attributes file)))
+ (puthash file (if attrs (file-attribute-modification-time attrs) 0) mtimes)))
(seq-sort (lambda (file1 file2)
(not (time-less-p (gethash file1 mtimes)
(gethash file2 mtimes))))
@@ -2740,7 +2741,8 @@ Parameters MODE VARIABLE VALUE are passed directly to
(let ((default-directory (projectile-project-root))
(atimes (make-hash-table :test 'equal :size (length files))))
(dolist (file files)
- (puthash file (file-attribute-access-time (file-attributes file)) atimes))
+ (let ((attrs (file-attributes file)))
+ (puthash file (if attrs (file-attribute-access-time attrs) 0) atimes)))
(seq-sort (lambda (file1 file2)
(not (time-less-p (gethash file1 atimes)
(gethash file2 atimes))))