invalid cross-device link when downloading photos

Hi!

I have recently moved my massive ~/Photos directory to a separate hard drive, so the setup is currently:

lrwxrwxrwx 1 anarcat anarcat 11 2019-02-07 19:37 /home/anarcat/Photos -> /srv/Photos

I used to simply import pictures in that directory with RPD, but now it fails to import any picture with the following errors:

Unable to create the photo DSCF8345.RAF in /home/anarcat/Photos/2019/02/09/sutton. The download file was DSCF8345.RAF in disk. It was not downloaded.
Error: 18 Invalid cross-device link

Obviously, it’s simple to change the target directory in the GUI: just use /srv/Photos instead of ~/Photos but I feel it’s strange that such a mistake should occur - shouldn’t RPD be able to follow that symlink without such a glitch?

Thanks!

Please file a bug report. The problem very likely arises because the program is performing a rename operation assuming it is on the same drive. In your case, it is not, so the rename command is failing. The solution will be to save the temporary files Rapid Photo Downloader renames to the proper target drive.

However, I will not be able to fix this until sometime later this year, because I’m currently focused on completing my dissertation.

will do, thanks! good luck on that writing! :slight_smile:

update: here’s the bug report.

1 Like

Thanks!

easiest fix might be to create the tmp file in the target directory (e.g. with .targetfilename-randomsring) and then rename it just inside the directory (iirc, that’s what rsync does)

1 Like

It’s a little tricky because the target directory is not known until the entirety of the file is created as a temporary file on the target file system. Only after its metadata has been read can the target directory be computed.

Currently the temporary directories are created in the base download folder. They are created for each device being downloaded from, eliminating the possibility of duplicate files overwriting each other when multiple devices are being downloaded from.