summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 390367fa67..059ec28dbb 100644
--- a/dir.c
+++ b/dir.c
@@ -1302,7 +1302,7 @@ void setup_standard_excludes(struct dir_struct *dir)
}
if (!access(path, R_OK))
add_excludes_from_file(dir, path);
- if (!access(excludes_file, R_OK))
+ if (excludes_file && !access(excludes_file, R_OK))
add_excludes_from_file(dir, excludes_file);
}