X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=aoview%2Faoview_dev.c;h=2fabfe267b62c7af8636c2a4ce759fe25ba6f599;hp=a326ad73defab28cd0a040716e8806e05062743b;hb=0f3233c49f43cd4e372e613303919ce4d50255b2;hpb=be3f4fed7b863c8cdaabe32b61b65a8b3cd11355 diff --git a/aoview/aoview_dev.c b/aoview/aoview_dev.c index a326ad73..2fabfe26 100644 --- a/aoview/aoview_dev.c +++ b/aoview/aoview_dev.c @@ -91,7 +91,7 @@ usb_tty(char *sys) dir_filter_tty, alphasort); free(endpoint_full); - if (ntty) { + if (ntty > 0) { tty = aoview_fullname("/dev", namelist[0]->d_name + 4); free(namelist); return tty; @@ -143,6 +143,8 @@ dir_filter_dev(const struct dirent *d) continue; if (c == '-') continue; + if (c == '.' && n != d->d_name + 1) + continue; return 0; } return 1;