[RAPPS] Set working directory for zip generated shortcuts (#7674)

Some applications are broken and assume the working directory is the
same as the .exe directory (xrick etc).
This commit is contained in:
Whindmar Saksit 2025-01-29 00:46:11 +01:00 committed by GitHub
parent b9852e83d2
commit b35becef2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -309,6 +309,9 @@ CreateShortcut(const CStringW &Target)
{ {
if (SUCCEEDED(hr = link->SetPath(Target))) if (SUCCEEDED(hr = link->SetPath(Target)))
{ {
SplitFileAndDirectory(Target, &tmp);
link->SetWorkingDirectory(tmp);
if (SUCCEEDED(GetCustomIconPath(Info, tmp))) if (SUCCEEDED(GetCustomIconPath(Info, tmp)))
{ {
LPWSTR p = tmp.GetBuffer(); LPWSTR p = tmp.GetBuffer();