1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

mktemp: prefix prefix_of_template use to_string_lossy

Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
This commit is contained in:
Zaú Júlio 2023-02-16 18:43:32 -03:00 committed by GitHub
parent af4ce911c8
commit 9e2c543cd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -283,7 +283,7 @@ impl Params {
.to_string();
// Check that the prefix is valid.
let prefix_of_template = Path::new(prefix_from_template).display().to_string();
let prefix_of_template = Path::new(prefix_from_template).to_string_lossy();
if options.treat_as_template && prefix_of_template.contains(MAIN_SEPARATOR) {
return Err(MkTempError::PrefixContainsDirSeparator(options.template));