aboutsummaryrefslogtreecommitdiff
path: root/src/env-update.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/env-update.c')
-rw-r--r--src/env-update.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/env-update.c b/src/env-update.c
index aef50bc4..c9fbf1a8 100644
--- a/src/env-update.c
+++ b/src/env-update.c
@@ -132,9 +132,10 @@ int env_update (int argc, char **argv)
STRLIST_FOREACH (files, file, i) {
char *path = rc_strcatpaths (ENVDIR, file, (char *) NULL);
char **entries = NULL;
+ struct stat buf;
j = strlen (file);
- if (! rc_is_dir (path) &&
+ if (stat (file, &buf) == 0 && S_ISDIR (buf.st_mode) == 0 &&
j > 2 &&
*file >= '0' &&
*file <= '9' &&