Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update src/libraries/System.Diagnostics.Process/src/System/Diagnostic…
…s/Process.Unix.cs

Co-authored-by: Adam Sitnik <[email protected]>
  • Loading branch information
batzen and adamsitnik committed Mar 27, 2021
commit 7384df6624406a8a47d51b5863d56e5c1b04c2f9
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ private bool ForkAndExecProcess(
return false;
}

string directoryForException = cwd?.Length > 0 ? cwd : Directory.GetCurrentDirectory();
string directoryForException = string.IsNullOrEmpty(cwd) ? Directory.GetCurrentDirectory() : cwd;
string msg = SR.Format(SR.FailedToStartFileDirectory, filename, directoryForException, GetErrorMessage(errno));
throw new Win32Exception(errno, msg);
}
Expand Down