-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid cross-device link during upload #3150
Comments
In general the code is correct. It uses move to move the file, a rename command would only work on the same drive, this was the case in the past but is now solved. The move command tries to copy the metadata which fails. I can't reproduce this, I think you need some complicated use case like the one in the closed issue or something in conjunction with docker (as in your case and in many similar cases) |
Focusing specifically on tmp, it might also be worth you sharing your docker compose, which ought to include how you're mapping your /tmp. Worth noting that docker can let you mount tmpfs but that's a Linux only feature, and it should work in WSL2, might be worth looking at that thread to see how they're doing it. Apologies if I've misunderstood anything. |
Nightly works, thank you so much ! FYI, docker-compose when I tried with TMPDIR is
https://docs.python.org/3/library/tempfile.html states that python should not use /tmp, but
Dir is 777, and I tried other directories but nothing worked |
Hello,
Thanks a lot for your work on calibre-web, it's an amazing piece of software !
I think this bug is related to calibre-web / python shutils, but as a disclaimer I'm running with a docker version in WSL. It looks awfully similar to #2062
My /tmp and /books are mounted on different drives.
I tried changing the TMPDIR environment variable to point to /books/tmp, but it didn't seem to have propagated to calibre (might be a specific docker issue)
My Repro:
I'm getting the error
The book has actually been moved
/books/Nathaniel Hawthorne/The Scarlet Letter (338)
But the cover is moved to
/books/Nathaniel Hawthorne/The Scarlet Letter
/books/Nathaniel Hawthorne/The Scarlet Letter
seems to be the path expected by calibre-web because if I move manually the book there, fetch metadata and save, things work just fine. The book's URL ends up beingadmin/book/338
I'm not sure why the cover is succeeding but the book doesn't. Could we do a copy+delete when we detect that the move failed ?
Here's the log.
The text was updated successfully, but these errors were encountered: