mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
mktemp: prefix prefix_of_template use to_string_lossy
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
This commit is contained in:
co-authored by
Terts Diepraam
parent
af4ce911c8
commit
9e2c543cd4
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user