diff --git a/core/autoload/files.el b/core/autoload/files.el index 7365641f6..3499f14ad 100644 --- a/core/autoload/files.el +++ b/core/autoload/files.el @@ -169,8 +169,10 @@ single file or nested compound statement of `and' and `or' statements." ;;;###autoload (defun doom-file-size (file &optional dir) - "Returns the size of FILE (in DIR) in kilobytes." - (when-let (file (file-exists-p! file dir)) + "Returns the size of FILE (in DIR) in bytes." + (let ((file (expand-file-name file dir))) + (unless (file-exists-p file) + (error "Couldn't find file %S" file)) (unless (file-readable-p file) (error "File %S is unreadable; can't acquire its filesize" file))