Closed kirillt closed 7 months ago
Workaround: create the folder for temporary files manually and bind it using export TMPDIR
.
@kirillt Do you have an example where it failed? It seems that the tempory files are created at the same root than the destination:
pub fn make_temp(&self) -> Result<TmpFile> {
TmpFile::create_in(&self.directory)
}
@gwendalF usually, temporary folder is always /tmp
, but Shelf keeps the data by default in ~/.ark-shelf
.
I can double-check later. Maybe it also depends on where the binary is.
Solved in #88
Simplified procedure for atomic writing is "write to a temporary file, then hard link to the destination". This becomes a problem when the "destination" and "temporary file" reside on different filesystems, e.g.
/tmp
and/home
.Possible solutions: