summaryrefslogtreecommitdiff
path: root/cli/flags.rs
diff options
context:
space:
mode:
authorNayeem Rahman <muhammed.9939@gmail.com>2020-01-20 14:45:44 +0000
committerRy Dahl <ry@tinyclouds.org>2020-01-20 09:45:44 -0500
commit7f80f9db3f4c3b064b230adfec7ff958fc195da6 (patch)
treebda74057420a1b51ce293918b6e67123715ee945 /cli/flags.rs
parent60b53fd6b6dc2af83a64c332b9f3a1926f43d631 (diff)
refactor: Improve path handling in permission checks (#3714)
Diffstat (limited to 'cli/flags.rs')
-rw-r--r--cli/flags.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/flags.rs b/cli/flags.rs
index 4766fbe5f..42a876947 100644
--- a/cli/flags.rs
+++ b/cli/flags.rs
@@ -7,6 +7,7 @@ use clap::ArgMatches;
use clap::SubCommand;
use log::Level;
use std::collections::HashSet;
+use std::path::Path;
/// Creates vector of strings, Vec<String>
macro_rules! svec {
@@ -397,14 +398,13 @@ fn resolve_fs_whitelist(whitelist: &[String]) -> Vec<String> {
whitelist
.iter()
.map(|raw_path| {
- resolve_from_cwd(&raw_path)
+ resolve_from_cwd(Path::new(&raw_path))
.unwrap()
- .0
.to_str()
.unwrap()
.to_owned()
})
- .collect::<Vec<_>>()
+ .collect()
}
// Shared between the run and test subcommands. They both take similar options.