From 84b16407bf8bdf2f318eba75a483c5b2a367d6ae Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 29 Mar 2000 07:44:23 +0000 Subject: More Japanese filename fixes wrt VFS code from Tomoki AONO (This used to be commit a9b628ebaa90e464366d0284226753f31439af9f) --- source3/smbd/dir.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'source3/smbd/dir.c') diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 58b0061e19..55d5bf132c 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -685,13 +685,14 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto) while ((n = vfs_readdirname(conn, p))) { int l; - pstring zn; - - pstrcpy(zn, unix_to_dos(n,True)); - l = strlen(zn)+1; + + l = strlen(n)+1; + + /* Return value of vfs_readdirname has already gone through + unix_to_dos() */ /* If it's a vetoed file, pretend it doesn't even exist */ - if (use_veto && conn && IS_VETO_PATH(conn, zn)) continue; + if (use_veto && conn && IS_VETO_PATH(conn, n)) continue; if (used + l > dirp->mallocsize) { int s = MAX(used+l,used+2000); @@ -705,7 +706,7 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto) dirp->mallocsize = s; dirp->current = dirp->data; } - pstrcpy(dirp->data+used,zn); + pstrcpy(dirp->data+used,n); used += l; dirp->numentries++; } -- cgit