[APPWIZ.CPL] Set a default shortcut-link description (#1520)
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Wed, 24 Apr 2019 01:44:44 +0000 (10:44 +0900)
committerHermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Wed, 24 Apr 2019 01:44:44 +0000 (03:44 +0200)
CORE-15511

dll/cpl/appwiz/createlink.c

index a35e915..77213ef 100644 (file)
@@ -450,7 +450,14 @@ ShowCreateShortcutWizard(HWND hwndCPl, LPWSTR szPath)
         StringCchCopyW(pContext->szOldFile, _countof(pContext->szOldFile), szPath);
         pch = PathFindFileNameW(pContext->szOrigin);
         if (pch && *pch)
+        {
+            /* build szDescription */
+            StringCchCopyW(pContext->szDescription, _countof(pContext->szDescription), pch);
+            *pch = 0;
+
+            pch = PathFindExtensionW(pContext->szDescription);
             *pch = 0;
+        }
     }
     PathAddBackslashW(pContext->szOrigin);