From cfc5d57122952b0a1b2bd18f607ab91a1042cdad Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 17 Mar 2004 01:55:01 +0000 Subject: [PATCH] Retrieve a short name in GetShortPathNameW if the long name contains spaces. --- dlls/kernel/path.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/kernel/path.c b/dlls/kernel/path.c index 7812b69b767..10299dcb7bb 100644 --- a/dlls/kernel/path.c +++ b/dlls/kernel/path.c @@ -339,10 +339,11 @@ DWORD WINAPI GetShortPathNameW( LPCWSTR longpath, LPWSTR shortpath, DWORD shortl /* Check, if the current element is a valid dos name */ if (tmplen <= 8+1+3+1) { + BOOLEAN spaces; memcpy(ustr_buf, longpath + lp, tmplen * sizeof(WCHAR)); ustr_buf[tmplen] = '\0'; ustr.Length = tmplen * sizeof(WCHAR); - if (RtlIsNameLegalDOS8Dot3(&ustr, NULL, NULL)) + if (RtlIsNameLegalDOS8Dot3(&ustr, NULL, &spaces) && !spaces) { sp += tmplen; lp += tmplen;