mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Add functionality to load prefs.json from profile-dir (as set with
--profile-dir on launch) Use T: Read rather than File, so that read_prefs_from_file can be tested
This commit is contained in:
parent
0397e2a24d
commit
3b93c9dde9
2 changed files with 42 additions and 10 deletions
|
@ -799,8 +799,12 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
|
|||
|
||||
set_defaults(opts);
|
||||
|
||||
// This must happen after setting the default options, since the prefs rely on
|
||||
// These must happen after setting the default options, since the prefs rely on
|
||||
// on the resource path.
|
||||
// Note that command line preferences have the highest precedent
|
||||
if get().profile_dir.is_some() {
|
||||
prefs::add_user_prefs();
|
||||
}
|
||||
for pref in opt_match.opt_strs("pref").iter() {
|
||||
let split: Vec<&str> = pref.splitn(2, '=').collect();
|
||||
let pref_name = split[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue