garzj / google-photos-migrate

A tool to fix EXIF data and recover filenames from a Google Photos takeout, preserving albums within the directory structure.
https://npmjs.com/package/google-photos-migrate
MIT License
104 stars 11 forks source link

Docker: "Error: EXDEV: cross-device link not permitted" #26

Closed LukasP46 closed 6 months ago

LukasP46 commented 6 months ago

When using this Docker command

docker run --rm -it --security-opt=label=disable \
                                         -v $(readlink -f ../Google\ photos/):/output \
                                         -v $(readlink -f ./output):/output \
                                         -v $(readlink -f ./error):/error \
                                        localhost/google-photos-migrate:newest \
                                          flat '/takeout' '/output' '/error' --timeout=60000

I get the following error: Error: EXDEV: cross-device link not permitted I thought about a workaround by using only one -v folder:

docker run --rm -it --security-opt=label=disable \
                                         -v $(readlink -f ../workdir):/v \
                                        localhost/google-photos-migrate:newest \
                                          flat '/v/Google Photos' '/v/output' '/v/error' --timeout=60000

But it has the same result.

garzj commented 6 months ago

I pushed a fix that will copy a file instead of moving it atomically if it's on another filesystem, though I did not try it. Please let me know if it works.

LukasP46 commented 6 months ago

Thanks for the fast try! Unfotonatelly I now get following error:

Renamed wrong extension .heic to .jpeg: /v/output/IMG_5809.HEIC
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: ENOENT: no such file or directory, lstat '/v/output/IMG_5809.HEIC'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'lstat',
  path: '/v/output/IMG_5809.HEIC'
}

Node.js v21.4.0
error Command failed with exit code 1.
garzj commented 6 months ago

25