get_tempdirs() is doing the right thing. All else considered, we prefer /tmp to /var/tmp because /tmp is cleaned automatically. "All else considered" means everything is on the same partition. The fallback cases you mention, where we throw up our hands and just pick /tmp regardless are really exceptional cases. Things like not being able to query the filesystem ID.
The fact that get_tempdir() returned the correct value for you shows things are working just fine. (it returned a path in your HOME)
Thank you for your patch! But I've already got a branch ready for review [1]. I don't want to re-order get_tempdirs(), but otherwise my patch is similar in spirit to yours.
As for security and restoring into /tmp, we should be fine. When restoring into a temporary directory, the directory should only be readable by the user doing the restore, using good old UNIX permissions. If that is not the case, please file a (separate) bug.
get_tempdirs() is doing the right thing. All else considered, we prefer /tmp to /var/tmp because /tmp is cleaned automatically. "All else considered" means everything is on the same partition. The fallback cases you mention, where we throw up our hands and just pick /tmp regardless are really exceptional cases. Things like not being able to query the filesystem ID.
The fact that get_tempdir() returned the correct value for you shows things are working just fine. (it returned a path in your HOME)
Thank you for your patch! But I've already got a branch ready for review [1]. I don't want to re-order get_tempdirs(), but otherwise my patch is similar in spirit to yours.
As for security and restoring into /tmp, we should be fine. When restoring into a temporary directory, the directory should only be readable by the user doing the restore, using good old UNIX permissions. If that is not the case, please file a (separate) bug.
[1] https:/ /code.launchpad .net/~mterry/ deja-dup/ tempdir- archive- dir