aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers/unix
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-11-04 17:55:55 +0100
committerPatrik Nyblom <[email protected]>2010-11-30 16:30:50 +0100
commitb9101fe19b7f8d659d266152b36cc436b90c77a3 (patch)
tree8f5fe5695c36a8ce39c10eceea839d1f2710dd40 /erts/emulator/drivers/unix
parentbe63e483361c9a764f6a68df80e50fd7bd825e6b (diff)
downloadotp-b9101fe19b7f8d659d266152b36cc436b90c77a3.tar.gz
otp-b9101fe19b7f8d659d266152b36cc436b90c77a3.tar.bz2
otp-b9101fe19b7f8d659d266152b36cc436b90c77a3.zip
Make Unicode filenames work on Windows
Diffstat (limited to 'erts/emulator/drivers/unix')
-rw-r--r--erts/emulator/drivers/unix/unix_efile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c
index b19f632f52..6297ccb8bc 100644
--- a/erts/emulator/drivers/unix/unix_efile.c
+++ b/erts/emulator/drivers/unix/unix_efile.c
@@ -587,7 +587,8 @@ efile_readdir(Efile_error* errInfo, /* Where to return error codes. */
open directory.*/
char* buffer, /* Pointer to buffer for
one filename. */
- size_t size) /* Size of buffer. */
+ size_t *size) /* in-out Size of buffer, length
+ of name. */
{
DIR *dp; /* Pointer to directory structure. */
struct dirent* dirp; /* Pointer to directory entry. */
@@ -620,6 +621,7 @@ efile_readdir(Efile_error* errInfo, /* Where to return error codes. */
continue;
buffer[0] = '\0';
strncat(buffer, dirp->d_name, size-1);
+ *size = strlen(dirp->d_name);
return 1;
}
}