diff --git a/src/index.html b/src/index.html index d77b8a0..f095e2c 100644 --- a/src/index.html +++ b/src/index.html @@ -104,7 +104,7 @@ } function addPath(file, index) { - const actionTd = file.name === ".." || readonly ? "" : ` + const actionTd = readonly ? "" : `
diff --git a/src/server.rs b/src/server.rs index 45ac63a..ff20147 100644 --- a/src/server.rs +++ b/src/server.rs @@ -143,18 +143,6 @@ impl InnerService { let base_path = &self.args.path; let mut rd = fs::read_dir(path).await?; let mut paths: Vec = vec![]; - if self.args.path != path { - paths.push(PathItem { - path_type: PathType::Dir, - name: "..".to_owned(), - path: format!( - "/{}", - normalize_path(path.parent().unwrap().strip_prefix(base_path).unwrap()) - ), - mtime: None, - size: None, - }) - } while let Some(entry) = rd.next_entry().await? { let entry_path = entry.path(); let rel_path = entry_path.strip_prefix(base_path).unwrap();