diff --git a/commands/ls.c b/commands/ls.c index 771477b..e549918 100644 --- a/commands/ls.c +++ b/commands/ls.c @@ -115,11 +115,8 @@ continue; } - if (s.st_mode & S_IFDIR) { - char *norm = normalise_path(tmp); - ls(norm, flags); - free(norm); - } + if (s.st_mode & S_IFDIR) + ls(tmp, flags); } out: @@ -158,7 +155,7 @@ flags |= LS_SHOWARG; if (optind == argc) { - ret = ls(getcwd(), flags); + ret = ls(".", flags); return ret ? 1 : 0; }