Closed crawfxrd closed 1 year ago
While at it, should check exact name behavior for tempdir
vs tempfile
. I think tempdir
might have added a separator (.
) between the prefix and random ID, but tempfile
requires specifying the separator (as shown in the docs).
This doesn't break behavior, but would make it exactly match the old behavior.
The new function's docs also say:
The directory and everything inside it will be automatically deleted once the returned TempDir is destroyed.
I.e., the cleanup in the error handling can also be removed then?
That's always been the case (tempdir had the same behavior), but it's outside the scope of the cleanup I did.
Awesome, thanks y'all for the quick responses and fixes! 🧡
The argument order is wrong, causing upgrades to fail when moving the temp extract to the EFI partition.
Additionally, add a
.
as a separator to the prefix to exactly match the old tempdir behavior, as tempfile does not add a separator itself.Fixes: 4613ff0badba ("Update edition, deps, toolchain") Ref:
tempfile::TempDir#with_prefix_in
Resolves: #120