Skip to content

Commit

Permalink
Fix: Fixed issue where pinned applications were executed in %windir%\…
Browse files Browse the repository at this point in the history
…System32 (files-community#14420)
  • Loading branch information
hishitetsu authored Jan 10, 2024
1 parent 534da91 commit 45b2d28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Files.App/Utils/Shell/LaunchHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private static async Task<bool> HandleApplicationLaunch(string application, stri
Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.User));
}

process.StartInfo.WorkingDirectory = workingDirectory;
process.StartInfo.WorkingDirectory = string.IsNullOrEmpty(workingDirectory) ? PathNormalization.GetParentDir(application) : workingDirectory;
process.Start();

Win32API.BringToForeground(currentWindows);
Expand All @@ -120,7 +120,7 @@ private static async Task<bool> HandleApplicationLaunch(string application, stri
process.StartInfo.FileName = application;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.Arguments = arguments;
process.StartInfo.WorkingDirectory = workingDirectory;
process.StartInfo.WorkingDirectory = string.IsNullOrEmpty(workingDirectory) ? PathNormalization.GetParentDir(application) : workingDirectory;

try
{
Expand Down

0 comments on commit 45b2d28

Please sign in to comment.