diff --git a/src/bin/ls/main.c b/src/bin/ls/main.c index 9cf517e..5ab6254 100644 --- a/src/bin/ls/main.c +++ b/src/bin/ls/main.c @@ -60,7 +60,14 @@ pwd = (char *)malloc(256); permsData = (char *)malloc(13); - if (argv[1] == 0x0) { + if (argv == 0x0) { + getcwd(pwd,256); + if ((fd = fopen(pwd,"rb")) == 0x0) { + printf("Error: Reading Directory\n"); + exit(1); + } + } + else if (argv[1] == 0x0) { getcwd(pwd,256); if ((fd = fopen(pwd,"rb")) == 0x0) { printf("Error: Reading Directory\n");