OSDN Git Service

Missed checking in dirtree_recurse() change (now needs specific DIRTREE_SYMFOLLOW...
authorRob Landley <rob@landley.net>
Sun, 3 Aug 2014 00:54:38 +0000 (19:54 -0500)
committerRob Landley <rob@landley.net>
Sun, 3 Aug 2014 00:54:38 +0000 (19:54 -0500)
toys/posix/ls.c

index 3a7de63..ee8dbc0 100644 (file)
@@ -276,7 +276,7 @@ static void listfiles(int dirfd, struct dirtree *indir)
   } else {
     // Read directory contents. We dup() the fd because this will close it.
     indir->data = dup(dirfd);
-    dirtree_recurse(indir, filter, (flags&FLAG_L));
+    dirtree_recurse(indir, filter, (flags&FLAG_L) ? DIRTREE_SYMFOLLOW : 0);
   }
 
   // Copy linked list to array and sort it. Directories go in array because