diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib9/_p9dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib9/_p9dir.c b/src/lib9/_p9dir.c index 18e899b6..83f35602 100644 --- a/src/lib9/_p9dir.c +++ b/src/lib9/_p9dir.c @@ -176,7 +176,7 @@ _p9dir(struct stat *st, char *name, Dir *d, char **str, char *estr) /* fetch real size for disks */ #ifdef _HAVEDISKSIZE - if((fd = open(name, O_RDONLY)) >= 0){ + if(S_ISBLK(st->st_mode) && (fd = open(name, O_RDONLY)) >= 0){ d->length = disksize(fd, major(st->st_dev)); close(fd); } |