[KERNEL32]: Addendum to r73479: display the file that failed to be opened before...
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 23 Dec 2016 11:43:21 +0000 (11:43 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 23 Dec 2016 11:43:21 +0000 (11:43 +0000)
svn path=/trunk/; revision=73480

reactos/dll/win32/kernel32/client/proc.c

index 041adf6..b239f7c 100644 (file)
@@ -2923,13 +2923,16 @@ StartScan:
                             FILE_NON_DIRECTORY_FILE);
     }
 
+    /* Failure path, display which file failed to open */
+    if (!NT_SUCCESS(Status))
+        DPRINT1("Open file failed: %lx (%wZ)\n", Status, &PathName);
+
     /* Cleanup in preparation for failure or success */
     RtlReleaseRelativeName(&SxsWin32RelativePath);
 
     if (!NT_SUCCESS(Status))
     {
         /* Failure path, try to understand why */
-        DPRINT1("Open file failed: %lx (%wZ)\n", Status, &PathName);
         if (RtlIsDosDeviceName_U(lpApplicationName))
         {
             /* If a device is being executed, return this special error code */