I’m wondering about the behavior of films.new() with symlinks:
local dt = require "darktable"
-- Create a film roll with a symlink path
local new_film = dt.films.new("/symlink/folder")
-- Prints the actual resolved path (Issue: /mountpoint/folder instead of /symlink/folder)
dt.print(new_film.path)
This shows that when creating the film roll, the symlink path is not preserved, but instead, it’s resolved to the actual path.
What operating system? I use symbolic linking heavily (in subdirectories, not root) and haven’t noticed a problem, but I’m on Linux. I’ll run some tests and see.
I can reproduce. If I create a root symlink to an existing set of pictures and import them, the symlink is preserved and not expanded. I’ll look at the code and see if I can figure out what’s happening.
In the case above where I said the symlink was preserved, I had to add the symlink as a location before it would let me import. So it may be related to whether darktable actually “knows” about the symlink.
I had also noticed this. Even if the film roll already exists under the symlink, films.new() creates a new one under the real path.
Edit: Same with dt.database.import("/s/Bilder-NAS/Archiv/"). The recursive import doesn’t take place under /s/Bilder-NAS/Archiv/, but under /m/nucbox-NAS/Bilder/Archiv/