Skip to content

Commit

Permalink
fix: avoid crash after upgrade on Linux (electron#41046)
Browse files Browse the repository at this point in the history
  • Loading branch information
cptpcrd authored and Mrnikifabio committed May 14, 2024
1 parent 2f6b6a8 commit d3711f1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions shell/browser/electron_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,15 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches(
base::CommandLine* command_line,
int process_id) {
// Make sure we're about to launch a known executable
#if BUILDFLAG(IS_LINUX)
// On Linux, do not perform this check for /proc/self/exe. It will always
// point to the currently running executable so this check is not
// necessary, and if the executable has been deleted it will return a fake
// name that causes this check to fail.
if (command_line->GetProgram() != base::FilePath(base::kProcSelfExe)) {
#else
{
#endif
ScopedAllowBlockingForElectron allow_blocking;
base::FilePath child_path;
base::FilePath program =
Expand Down

0 comments on commit d3711f1

Please sign in to comment.