aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/navigator.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/navigator.c b/src/navigator.c
index c2a5f5f..c399404 100644
--- a/src/navigator.c
+++ b/src/navigator.c
@@ -73,10 +73,8 @@ int imv_navigator_add(struct imv_navigator *nav, const char *path,
{
char path_buf[PATH_MAX+1];
struct stat path_info;
- if (stat(path, &path_info)) {
- return 1;
- }
- if (S_ISDIR(path_info.st_mode)) {
+ if ((stat(path, &path_info) == 0) &&
+ S_ISDIR(path_info.st_mode)) {
int result = 0;
DIR *d = opendir(path);
if (d) {