Piotr Caban : ntdll: Keep drive letter size in RtlGetFullPathName_U when full path is specified.

Alexandre Julliard julliard at winehq.org
Fri Jul 29 10:17:08 CDT 2016


Module: wine
Branch: master
Commit: f333bf47a8077ecf634163c8a67dc2502ca8295c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f333bf47a8077ecf634163c8a67dc2502ca8295c

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Thu Jul 28 14:24:05 2016 +0200

ntdll: Keep drive letter size in RtlGetFullPathName_U when full path is specified.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/path.c                        | 2 +-
 dlls/ntdll/tests/path.c                  | 9 +++++----
 dlls/shell32/tests/shelllink.c           | 2 +-
 programs/cmd/tests/test_builtins.cmd.exp | 2 +-
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c
index ae0646a..ac4807f 100644
--- a/dlls/ntdll/path.c
+++ b/dlls/ntdll/path.c
@@ -625,7 +625,7 @@ static ULONG get_full_path_helper(LPCWSTR name, LPWSTR buffer, ULONG size)
 
     case ABSOLUTE_DRIVE_PATH:   /* c:\foo  */
         reqsize = sizeof(WCHAR);
-        tmp[0] = toupperW(name[0]);
+        tmp[0] = name[0];
         ins_str = tmp;
         dep = 1;
         mark = 3;
diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c
index cc7259e..c19189d 100644
--- a/dlls/ntdll/tests/path.c
+++ b/dlls/ntdll/tests/path.c
@@ -265,7 +265,7 @@ static void test_RtlGetFullPathName_U(void)
             { "c:/test/  ....   ..   ",      "c:\\test\\",       NULL},
             { "c:/test/..",                  "c:\\",             NULL},
             { "c:/test/.. ",                 "c:\\test\\",       NULL},
-            { "c:/TEST",                     "c:\\test",         "test"},
+            { "c:/TEST",                     "c:\\TEST",         "TEST"},
             { "c:/test/file",                "c:\\test\\file",   "file"},
             { "c:/test./file",               "c:\\test\\file",   "file"},
             { "c:/test.. /file",             "c:\\test.. \\file","file"},
@@ -279,6 +279,7 @@ static void test_RtlGetFullPathName_U(void)
             { "c:///test\\..\\file\\..\\//", "c:\\",             NULL},
             { "c:/test../file",              "c:\\test.\\file",  "file",
                                              "c:\\test..\\file", "file"},  /* vista */
+            { "c:\\test",                    "c:\\test",         "test"},
             { NULL, NULL, NULL}
         };
 
@@ -325,14 +326,14 @@ static void test_RtlGetFullPathName_U(void)
             "Wrong result %d/%d for \"%s\"\n", ret, len, test->path );
         ok(pRtlUnicodeToMultiByteN(rbufferA,MAX_PATH,&reslen,rbufferW,(lstrlenW(rbufferW) + 1) * sizeof(WCHAR)) == STATUS_SUCCESS,
            "RtlUnicodeToMultiByteN failed\n");
-        ok(!lstrcmpiA(rbufferA,test->rname) || (test->alt_rname && !lstrcmpiA(rbufferA,test->alt_rname)),
+        ok(!lstrcmpA(rbufferA,test->rname) || (test->alt_rname && !lstrcmpA(rbufferA,test->alt_rname)),
            "Got \"%s\" expected \"%s\"\n",rbufferA,test->rname);
         if (file_part)
         {
             ok(pRtlUnicodeToMultiByteN(rfileA,MAX_PATH,&reslen,file_part,(lstrlenW(file_part) + 1) * sizeof(WCHAR)) == STATUS_SUCCESS,
                "RtlUnicodeToMultiByteN failed\n");
-            ok((test->rfile && !lstrcmpiA(rfileA,test->rfile)) ||
-               (test->alt_rfile && !lstrcmpiA(rfileA,test->alt_rfile)),
+            ok((test->rfile && !lstrcmpA(rfileA,test->rfile)) ||
+               (test->alt_rfile && !lstrcmpA(rfileA,test->alt_rfile)),
                "Got \"%s\" expected \"%s\"\n",rfileA,test->rfile);
         }
         else
diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c
index f7c091e..8af3c97 100644
--- a/dlls/shell32/tests/shelllink.c
+++ b/dlls/shell32/tests/shelllink.c
@@ -248,7 +248,7 @@ static void test_get_set(void)
     strcpy(buffer,"garbage");
     r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH);
     ok(r==S_OK, "GetPath failed (0x%08x)\n", r);
-    ok(!strcmp(buffer, "C:\\nonexistent\\file") ||
+    todo_wine ok(!strcmp(buffer, "C:\\nonexistent\\file") ||
        broken(!strcmp(buffer, "C:\\\"c:\\nonexistent\\file\"")), /* NT4 */
        "case doesn't match\n");
 
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 82b13f7..67e75e0 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -980,7 +980,7 @@ a d
 a
 C r
 foo bar baz
- at todo_wine@c:\
+c:\
 ------ skip option
 c
 no output




More information about the wine-cvs mailing list