Fix bug with ls globbing a single directory

This commit is contained in:
Patrick Meredith 2019-09-06 23:20:13 -04:00
parent 35c0eb0059
commit 1b2fdf7c1e

View File

@ -106,8 +106,7 @@ impl Shell for FilesystemShell {
if entries.len() == 1 { if entries.len() == 1 {
if let Ok(entry) = &entries[0] { if let Ok(entry) = &entries[0] {
if entry.is_dir() { if entry.is_dir() {
let entries = std::fs::read_dir(&full_path); let entries = std::fs::read_dir(&entry);
let entries = match entries { let entries = match entries {
Err(e) => { Err(e) => {
if let Some(s) = args.nth(0) { if let Some(s) = args.nth(0) {
@ -126,6 +125,7 @@ impl Shell for FilesystemShell {
} }
Ok(o) => o, Ok(o) => o,
}; };
for entry in entries { for entry in entries {
let entry = entry?; let entry = entry?;
let filepath = entry.path(); let filepath = entry.path();