Skip to content

Commit

Permalink
fix: create userDataDir on requestSingleInstanceLock() if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
deermichel committed Apr 1, 2022
1 parent b2e7aea commit 8bc94e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shell/browser/api/electron_api_app.cc
Expand Up @@ -1148,6 +1148,8 @@ bool App::RequestSingleInstanceLock(gin::Arguments* args) {

base::FilePath user_dir;
base::PathService::Get(chrome::DIR_USER_DATA, &user_dir);
// The user_dir may have not been created yet.
base::CreateDirectoryAndGetError(user_dir, nullptr);

auto cb = base::BindRepeating(&App::OnSecondInstance, base::Unretained(this));
auto wrapped_cb = base::BindRepeating(NotificationCallbackWrapper, cb);
Expand Down

0 comments on commit 8bc94e1

Please sign in to comment.