diff --git a/lisp/org-persist.el b/lisp/org-persist.el index 57eac65b4..0c19d9125 100644 --- a/lisp/org-persist.el +++ b/lisp/org-persist.el @@ -999,7 +999,8 @@ Also, remove containers associated with non-existing files." (remote-files-num 0) (orphan-files (delete (org-file-name-concat org-persist-directory org-persist-index-file) - (directory-files-recursively org-persist-directory ".+")))) + (when (file-exists-p org-persist-directory) + (directory-files-recursively org-persist-directory ".+"))))) (dolist (collection org-persist--index) (let* ((file (plist-get (plist-get collection :associated) :file)) (web-file (and file (string-match-p "\\`https?://" file)))