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
co-authored by Terts Diepraam
parent af4ce911c8
commit 9e2c543cd4
+1 -1
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));