Don't restrict saving location outside vroot

pull/524/head
Arijit Basu 2 years ago
parent 289556f452
commit 5c4dec05ed
No known key found for this signature in database
GPG Key ID: 0F8EF5258DC38077

@ -102,7 +102,6 @@ pub(crate) fn explore_async(
pub(crate) fn explore_recursive_async(
config: ExplorerConfig,
vroot: Option<PathBuf>,
parent: PathBuf,
focused_path: Option<PathBuf>,
fallback_focus: usize,
@ -116,20 +115,13 @@ pub(crate) fn explore_recursive_async(
tx_msg_in.clone(),
);
if let Some(grand_parent) = parent.parent() {
if vroot
.as_ref()
.map(|v| grand_parent.starts_with(v))
.unwrap_or(true)
{
explore_recursive_async(
config,
vroot,
grand_parent.into(),
parent.file_name().map(|p| p.into()),
0,
tx_msg_in,
);
}
explore_recursive_async(
config,
grand_parent.into(),
parent.file_name().map(|p| p.into()),
0,
tx_msg_in,
);
}
}

@ -277,7 +277,6 @@ impl Runner {
explorer::explore_recursive_async(
app.explorer_config.clone(),
app.vroot.as_ref().map(PathBuf::from),
app.pwd.clone().into(),
self.focused_path,
app.directory_buffer.as_ref().map(|d| d.focus).unwrap_or(0),
@ -443,7 +442,6 @@ impl Runner {
ExploreParentsAsync => {
explorer::explore_recursive_async(
app.explorer_config.clone(),
app.vroot.as_ref().map(PathBuf::from),
app.pwd.clone().into(),
app.focused_node()
.map(|n| n.relative_path.clone().into()),

Loading…
Cancel
Save