summaryrefslogtreecommitdiffstats
path: root/src/proclist.rs
diff options
context:
space:
mode:
authorrabite <rabite@posteo.de>2019-04-07 13:43:41 +0200
committerrabite <rabite@posteo.de>2019-04-07 13:43:41 +0200
commit62474ff6bcbd78745a66a753cb5d3578ba52bc05 (patch)
treeca18ce48161f8fa40e65be2f1f9abf894f7622b9 /src/proclist.rs
parent9d6d2ac83ffca98d4a8cbd0bb9ad15534a0e806d (diff)
fix crash when running commands in unloaded directoryv1.0
Diffstat (limited to 'src/proclist.rs')
-rw-r--r--src/proclist.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/proclist.rs b/src/proclist.rs
index d712c33..b8e0524 100644
--- a/src/proclist.rs
+++ b/src/proclist.rs
@@ -51,6 +51,8 @@ impl Cmd {
}
fn substitute_cwd_files(&mut self, cmd: Vec<OsString>) -> Vec<OsString> {
+ if self.cwd_files.is_none() { return cmd; }
+
let cwd_pat = OsString::from("$s");
let cwd_files = self.cwd_files
.take()
@@ -66,6 +68,8 @@ impl Cmd {
}
fn substitute_tab_files(&mut self, cmd: Vec<OsString>) -> Vec<OsString> {
+ if self.tab_files.is_none() { return cmd; }
+
let tab_files = self.tab_files.take().unwrap();
tab_files.into_iter()
@@ -84,6 +88,8 @@ impl Cmd {
}
fn substitute_tab_paths(&mut self, cmd: Vec<OsString>) -> Vec<OsString> {
+ if self.tab_paths.is_none() { return cmd; }
+
let tab_paths = self.tab_paths.take().unwrap();
tab_paths.into_iter()