How can I tell emacs/e-lisp to check if a user defined variable is a full path to a file or just a folder name? Currently, for one particular mode, user can just define variable for a sqlite database as a folder, and as a result, get database error which is not very informative.
If it matters, the variable is org-roam-db-location
and default value is defined in org-roam-db.el
as:
(defcustom org-roam-db-location (locate-user-emacs-file "org-roam.db")
"The path to file where the Org-roam database is stored.
It is the user's responsibility to set this correctly, especially
when used with multiple Org-roam instances."
:type 'string
:group 'org-roam)