Closed slayernominee closed 1 year ago
f.file.persist(path).unwrap();
results without the other code in this error:
thread 'actix-rt|system:0|arbiter:0' panicked at 'called `Result::unwrap()` on an `Err` value: PersistError(Os { code: 18, kind: CrossesDevices, message: "Invalid cross-device link" })', src/api.rs:190:30
that also shouldnt result in any error from the examples from the actix project
I'd take a closer look at that error message in your first post. You need to convert the error from this library into the appropriate error for your application.
the final error is this one:
PersistError(Os { code: 18, kind: CrossesDevices, message: "Invalid cross-device link" })
but why do i get it? im using one partition ... no docker nothing
I assume you're writing the temporary file in /tmp
? That's likely in memory.
nope in the current working directy (in a subfolder of the home directory)
NamedTempFile::new()
will create a temporary file in your system's temporary file directory. You need NamedTempFile::new_in()
.
results in the same error if i specify my home directory
but only on my manjaro system (using a btfrs formated partition), on a mac it just works fine the same code
Unfortunately, this is an OS error so there's not much I can do but help debug. At this point, I'd recommend printing out the .path()
of the resulting temporary file and your current working directory to see if they appear to be on different filesystems (compare with the output of findmnt
).
when using the code example from the documentation:
this is my whole method