projects
/
nnn.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c051fc3
)
Fix crash on a broken USB
author
Arun Prakash Jana <engineerarun@gmail.com>
Sun, 14 Jul 2019 08:55:46 +0000 (14:25 +0530)
committer
Arun Prakash Jana <engineerarun@gmail.com>
Sun, 14 Jul 2019 08:55:46 +0000 (14:25 +0530)
src/nnn.c
patch
|
blob
|
history
diff --git
a/src/nnn.c
b/src/nnn.c
index 03c60db14f340a9e3967ab96ea110b698dc92c08..109645196106c4c647707fd550a8582ddb6ba81b 100644
(file)
--- a/
src/nnn.c
+++ b/
src/nnn.c
@@
-2845,8
+2845,8
@@
static int dentfill(char *path, struct entry **dents)
}
dp = readdir(dirp);
- // if (!dp) /* We have opened the dir, at least . would be returned */
-
//
goto exit;
+ if (!dp)
+
goto exit;
if (cfg.blkorder || dp->d_type == DT_UNKNOWN) {
/*
@@
-3007,7
+3007,7
@@
static int dentfill(char *path, struct entry **dents)
++n;
} while ((dp = readdir(dirp)));
-
//
exit:
+exit:
/* Should never be null */
if (closedir(dirp) == -1) {
dentfree();