commit - eb2657082b4df0f45482f9a48567f75dda5c9d11
commit + 496dd2b0d22a9e1f88d1e553c659fc6bc87a4bb2
blob - 28226c9e5fa2be06a3be6dd5233774ed87b2d9ad
blob + 0e1ea92883d9f25f10262dd7c5a618ce85f671e9
--- rover.c
+++ rover.c
return cmpdir ? cmpdir : strcoll(r1->name, r2->name);
}
-/* Get all entries for a given path (usually cwd). */
+/* Get all entries in current working directory. */
static int
-ls(char *path, Row **rowsp, uint8_t flags)
+ls(Row **rowsp, uint8_t flags)
{
DIR *dp;
struct dirent *ep;
Row *rows;
int i, n;
- if(!(dp = opendir(path))) return -1;
+ if(!(dp = opendir("."))) return -1;
n = -2; /* We don't want the entries "." and "..". */
while (readdir(dp)) n++;
rewinddir(dp);
chdir(CWD);
if (rover.nfiles)
free_rows(&rover.rows, rover.nfiles);
- rover.nfiles = ls(CWD, &rover.rows, FLAGS);
+ rover.nfiles = ls(&rover.rows, FLAGS);
if (!strcmp(CWD, rover.marks.dirpath)) {
for (i = 0; i < rover.nfiles; i++) {
for (j = 0; j < rover.marks.bulk; j++)