In most places I’ve read, including the project’s README, the example configuration for org-roam-directory use a trailing slash (e.g. (setq org-roam-directory "/path/to/org-files/"))
This is what I’ve been doing and it works fine. However, while moving things around and looking at the database, I noticed the paths stored in the db include a double slash between the directory and files, like "/Users/jbaty/Dropbox/notes/org//2020-02-07.org"
I found this off-putting, so I changed my config to (setq org-roam-directory "~/Dropbox/notes/org"), deleted the db and rebuilt the cache. Now the links all look better (single slashes) to me and everything seems to work fine.
I don’t believe having double slashes matters, but I’m curious if the examples and resulting double slashes are intentional or if I’m risking breakage by not using a trailing slash in my config.
Actually the choice of whether it has a trailing slash or not should not matter. The behaviour you’re seeing looks like a result of the new methods fo listing files: using find and rg. What operating system are you on, and what’s the output of: (org-roam--list-files-find (executable-find "find") org-roam-directory)?
On my system (NixOS), this returns me paths with single slashes, regardless of whether my directory has a trailing slash or not. Perhaps this is an issue on Windows and on Mac.
Right, I didn’t notice any actual problems when using a trailing slash for org-roam-directory, I just didn’t like that paths were stored using the double slash.
With org-roam-directory set to ~/Dropbox/notes/org/, (org-roam--list-files-find (executable-find "find") org-roam-directory) returns this…