From 46832825a6821d5c2af8eb0ae66581e94972231b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 18 Oct 2015 03:27:41 +0200
Subject: mpr: Return correct error code for non network paths and
 REMOTE_NAME_INFO_LEVEL in WNetGetUniversalName.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Michael Müller <michael@fds-team.de>
---
 dlls/mpr/tests/mpr.c | 6 +++---
 dlls/mpr/wnet.c      | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/mpr/tests/mpr.c b/dlls/mpr/tests/mpr.c
index 99b05f6..bf3d2cc 100644
--- a/dlls/mpr/tests/mpr.c
+++ b/dlls/mpr/tests/mpr.c
@@ -149,13 +149,13 @@ static void test_WNetGetRemoteName(void)
         info_size = sizeof(buffer);
         ret = WNetGetUniversalNameW(driveW, REMOTE_NAME_INFO_LEVEL,
                 buffer, &info_size);
-        todo_wine{
+
         if(drive_type == DRIVE_REMOTE)
-            ok(ret == WN_NO_ERROR, "WNetGetUniversalNameW failed: %08x\n", ret);
+            todo_wine ok(ret == WN_NO_ERROR, "WNetGetUniversalNameW failed: %08x\n", ret);
         else
             ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
                 "(%s) WNetGetUniversalNameW gave wrong error: %u\n", driveA, ret);
-        }
+
         ok(info_size == sizeof(buffer), "Got wrong size: %u\n", info_size);
     }
 }
diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c
index dd34969..4c1d221 100644
--- a/dlls/mpr/wnet.c
+++ b/dlls/mpr/wnet.c
@@ -1958,7 +1958,7 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
         break;
     }
     case REMOTE_NAME_INFO_LEVEL:
-        err = WN_NO_NETWORK;
+        err = WN_NOT_CONNECTED;
         break;
 
     default:
-- 
2.6.1

