-
Notifications
You must be signed in to change notification settings - Fork 37
TMPDIR fails when on separate partition #51
Comments
There are a few cases where manipulating files across partitions causes problems in Golang (example). I'm not sure there is an easy fix for this outside of checking for that specific error and creating the |
It's not that uncommon in linux to mount the home directory on a separate partition to the root directory. Is there any reason the anirip temporary directory can't simply be placed in the output directory? |
Can confirm this occurs in macOS as well. Temporary directory should be in PWD or app resilient enough to move (copy/delete) between mounted partitions. Error reported is:
|
Well, it also appears that this is also the architecture used by FreeNAS and Jails: a mount point back to the storage volume. So this will not work there, either. @turtletowerz are you still game for that PR? |
I could change the Rename function to move files a bit more properly, similar to the answer here, but I don't believe the issue is related to the temporary directory, as this is more related to how unix systems rename files. I'll make a PR sometime today, but I don't have any unix-based OS to test a new change on so if the PR gets approved I would like some feedback as to whether it worked or not. |
So maybe I just define $TMPDIR. Testing.
This appears to resolve the issue for macOS. |
On linux when TMPDIR is mounted on a different partition it fails to move the file due to it being across partitions with the error:
[anirip] Error: rename /tmp/anirip/episode.mkv $newfilename.mkv: invalid cross-device link
Altering TMPDIR to a directory on the same partition helps as a workaround for now.
The text was updated successfully, but these errors were encountered: