aboutsummaryrefslogtreecommitdiff
path: root/coreutils/diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/diff.c')
-rw-r--r--coreutils/diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/diff.c b/coreutils/diff.c
index 2c89a66e4..12c61ca1e 100644
--- a/coreutils/diff.c
+++ b/coreutils/diff.c
@@ -1114,8 +1114,8 @@ static char **get_dir(char *path) {
1114 else { 1114 else {
1115 DIR *dp; 1115 DIR *dp;
1116 struct dirent *ep; 1116 struct dirent *ep;
1117 if ((dp = opendir(path)) == NULL) 1117
1118 bb_error_msg("Error reading directory"); 1118 dp = bb_opendir(path);
1119 while ((ep = readdir(dp))) { 1119 while ((ep = readdir(dp))) {
1120 if ((!strcmp(ep->d_name, "..")) || (!strcmp(ep->d_name, "."))) 1120 if ((!strcmp(ep->d_name, "..")) || (!strcmp(ep->d_name, ".")))
1121 continue; 1121 continue;