Fix crash

Chromium crashed when ~/.config/chromium was empty due to incorrect rediff of the patch (there waas no return from function)
Took patch from https://git.altlinux.org/gears/c/chromium.git?p=chromium.git;a=blob;f=.rpm/patches/0001-OPENSUSE-enables-reading-of-the-master-preference.patch;h=ee73ff654a7ff1c2e831f1b5782d399780770e8a;hb=67bb49dda6122ece9f9e79d837595f0dd71dc03d
Fixes: 149500f78 ("change the fix master-prefs-path")
This commit is contained in:
Mikhail Novosyolov 2023-08-23 11:21:34 +03:00
parent f0e3f64f07
commit f7f118908a
2 changed files with 14 additions and 14 deletions

View file

@ -1,19 +1,19 @@
diff --git a/chrome/browser/first_run/first_run_internal_linux.cc b/chrome/browser/first_run/first_run_internal_linux.cc
index 33fd579..9890694 100644
--- a/chrome/browser/first_run/first_run_internal_linux.cc
+++ b/chrome/browser/first_run/first_run_internal_linux.cc
@@ -20,12 +20,9 @@ bool IsOrganicFirstRun() {
base::FilePath InitialPrefsPath() {
// The standard location of the initial prefs is next to the chrome binary.
+ // ...but we patch it to use /etc/chromium
base::FilePath dir_exe;
- if (!base::PathService::Get(base::DIR_EXE, &dir_exe)) {
- return base::FilePath();
--- a/chrome/installer/util/initial_preferences.cc
+++ b/chrome/installer/util/initial_preferences.cc
@@ -75,12 +75,8 @@
// static
base::FilePath InitialPreferences::Path(const base::FilePath& dir,
bool for_read) {
- base::FilePath initial_prefs = dir.AppendASCII("initial_preferences");
- if (!for_read || base::PathIsReadable(initial_prefs)) {
- return initial_prefs;
- }
-
- return installer::InitialPreferences::Path(dir_exe);
+ dir_exe = base::FilePath("/etc/chromium");
- return dir.AppendASCII("master_preferences");
+ base::FilePath initial_prefs = base::FilePath("/etc/chromium");
+ return initial_prefs.AppendASCII("master_preferences");
}
#endif // !BUILDFLAG(IS_MAC)
} // namespace internal

View file

@ -103,7 +103,7 @@
Summary: A fast web browser based on the Blink engine
Name: chromium-browser-stable
Version: 115.0.5790.170
Release: 1
Release: 2
License: BSD, LGPL
Group: Networking/WWW
Url: https://www.chromium.org/Home