mirror of
https://github.com/wez/wezterm.git
synced 2024-11-23 06:54:45 +03:00
Always provide an absolute path for the working directory to CreateProcessW()
This commit is contained in:
parent
5904140abf
commit
91ae9bcbaf
@ -243,7 +243,17 @@ impl CommandBuilder {
|
||||
|
||||
dir.map(|dir| {
|
||||
let mut wide = vec![];
|
||||
wide.extend(dir.encode_wide());
|
||||
|
||||
if Path::new(dir).is_relative() {
|
||||
if let Ok(ccwd) = std::env::current_dir() {
|
||||
wide.extend(ccwd.join(dir).as_os_str().encode_wide());
|
||||
} else {
|
||||
wide.extend(dir.encode_wide());
|
||||
}
|
||||
} else {
|
||||
wide.extend(dir.encode_wide());
|
||||
}
|
||||
|
||||
wide.push(0);
|
||||
wide
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user