summaryrefslogtreecommitdiff
path: root/src/scandir.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scandir.c')
-rw-r--r--src/scandir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scandir.c b/src/scandir.c
index 197f63fd6..27aa63567 100644
--- a/src/scandir.c
+++ b/src/scandir.c
@@ -21,6 +21,7 @@ USA. */
#else
# include "flstring.h"
+# include <FL/fl_utf8.H>
# if !HAVE_SCANDIR
# include <stdlib.h>
@@ -49,7 +50,7 @@ fl_scandir(const char *dir, struct dirent ***namelist,
int (*select)(struct dirent *),
int (*compar)(struct dirent **, struct dirent **))
{
- DIR *dp = opendir (dir);
+ DIR *dp = opendir (fl_utf2mbcs(dir));
struct dirent **v = NULL;
size_t vsize = 0, i;
struct dirent *d;