branch: elpa/csv2ledger commit eaf2ad4fee5627be44f25ec0a3bd72be2252301c Author: Joost Kremers <joostkrem...@fastmail.fm> Commit: Joost Kremers <joostkrem...@fastmail.fm>
Do not test if file exists if file is nil. --- csv2ledger.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/csv2ledger.el b/csv2ledger.el index 30387589c0..d680283609 100644 --- a/csv2ledger.el +++ b/csv2ledger.el @@ -202,7 +202,8 @@ reversed. FROM and TO default to `c2l-fallback-account' and (defun c2l-read-accounts (file) "Read list of accounts from FILE." - (when (file-readable-p file) + (when (and (stringp file) + (file-readable-p file)) (with-temp-buffer (insert-file-contents file) (goto-char (point-min)) @@ -217,7 +218,8 @@ reversed. FROM and TO default to `c2l-fallback-account' and "Read account matchers from FILE. See the documentation for the variable `c2l-account-matchers-file' for details on the matcher file." - (when (file-readable-p file) + (when (and (stringp file) + (file-readable-p file)) (with-temp-buffer (insert-file-contents file) (goto-char (point-min))