[PATCH 10/19] ls: Do not depend on normalise_path()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When we want to show a directory we want to show the path
ls is passed, not the normalised one.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 commands/ls.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/commands/ls.c b/commands/ls.c
index 771477b6e0..e54991862d 100644
--- a/commands/ls.c
+++ b/commands/ls.c
@@ -115,11 +115,8 @@ int ls(const char *path, ulong flags)
 			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 @@ static int do_ls(int argc, char *argv[])
 		flags |= LS_SHOWARG;
 
 	if (optind == argc) {
-		ret = ls(getcwd(), flags);
+		ret = ls(".", flags);
 		return ret ? 1 : 0;
 	}
 
-- 
2.16.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux