mux: spawn: only use the cwd from a pane in a compatible domain
If the target domain_id doesn't match the source pane.domain_id(), then we consider the filesystem namespace to be incompatible and won't try to use it. refs: https://github.com/wez/wezterm/issues/3442
This commit is contained in:
2 files changed
+12
-3
No files matched your search
@@ -87,6 +87,9 @@ As features stabilize some brief notes about them will accumulate here.
|
||||
* mux: [pane:has_unseen_output()](config/lua/pane/has_unseen_output.md) and
|
||||
[PaneInformation.has_unseen_output](config/lua/PaneInformation.md) now work
|
||||
with multiplexer panes. #2625
|
||||
* mux: attempting to split a remote pane into a different target domain could
|
||||
produce a warning about the remote home directory not being readable to
|
||||
the local machine or vice versa. #3442
|
||||
|
||||
### 20230326-111934-3666303c
|
||||
|
||||
|
||||
+9
-3
@@ -1101,10 +1101,11 @@ impl Mux {
|
||||
&self,
|
||||
command_dir: Option<String>,
|
||||
pane: Option<Arc<dyn Pane>>,
|
||||
target_domain: DomainId,
|
||||
) -> Option<String> {
|
||||
command_dir.or_else(|| {
|
||||
match pane {
|
||||
Some(pane) => pane
|
||||
Some(pane) if pane.domain_id() == target_domain => pane
|
||||
.get_current_working_dir()
|
||||
.and_then(|url| {
|
||||
percent_decode_str(url.path())
|
||||
@@ -1123,7 +1124,7 @@ impl Mux {
|
||||
path
|
||||
}
|
||||
}),
|
||||
None => None,
|
||||
_ => None,
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1159,7 +1160,11 @@ impl Mux {
|
||||
command_dir,
|
||||
} => SplitSource::Spawn {
|
||||
command,
|
||||
command_dir: self.resolve_cwd(command_dir, Some(Arc::clone(¤t_pane))),
|
||||
command_dir: self.resolve_cwd(
|
||||
command_dir,
|
||||
Some(Arc::clone(¤t_pane)),
|
||||
domain.domain_id(),
|
||||
),
|
||||
},
|
||||
other => other,
|
||||
};
|
||||
@@ -1303,6 +1308,7 @@ impl Mux {
|
||||
}
|
||||
None => None,
|
||||
},
|
||||
domain.domain_id(),
|
||||
);
|
||||
|
||||
let tab = domain
|
||||
|
||||
Reference in new issue
Block a user