Skip to content

Commit

Permalink
fix a display bug with fuse
Browse files Browse the repository at this point in the history
  • Loading branch information
rolinh committed Mar 27, 2012
1 parent cbcffd7 commit 666a416
Showing 1 changed file with 9 additions and 25 deletions.
34 changes: 9 additions & 25 deletions dfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,37 +319,21 @@ fetch_info(struct list *lst)
/* enqueue the element into the queue */
enqueue(lst, *fmi);

/* skip fuse-daemon */
if (strcmp(fmi->fsname, "gvfs-fuse-daemon") == 0)
continue;

/* adjust longest for the queue */
if (aflag) {
/* is it the longest fsname? */

/* adjust for gvfs-fuse-daemon */
if (strcmp(fmi->fsname, "gvfs-fuse-daemon") == 0) {
lst->fsmaxlen = imax(lst->fsmaxlen, 11);
lst->typemaxlen = imax(lst->typemaxlen, 4);
lst->dirmaxlen = imax((int)strlen(fmi->dir),
lst->dirmaxlen);
} else {
lst->fsmaxlen = imax((int)strlen(fmi->fsname),
lst->fsmaxlen);
/* is it the longest dir */
lst->fsmaxlen);
lst->dirmaxlen = imax((int)strlen(fmi->dir),
lst->dirmaxlen);
/* is it the longest type? */
lst->typemaxlen = imax((int)strlen(fmi->type),
lst->typemaxlen);
} else {
/* we do not care about stuff not from /dev/ */
if (strncmp(fmi->fsname, "/dev/", 5) == 0) {
/* is it the longest fsname? */
lst->fsmaxlen = imax(
(int)strlen(fmi->fsname),
lst->fsmaxlen);
/* is it the longest dir */
lst->dirmaxlen = imax(
(int)strlen(fmi->dir),
lst->dirmaxlen);
/* is it the longest type? */
lst->typemaxlen = imax(
(int)strlen(fmi->type),
lst->typemaxlen);
}
}
}
}
Expand Down

0 comments on commit 666a416

Please sign in to comment.