mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
TextEditor: Unveil the full path to the config file
Unveil ~/.config/TextEditor.ini instead of the whole config directory.
This commit is contained in:
parent
aacb1f0bf4
commit
7d579b04c5
Notes:
sideshowbarker
2024-07-18 05:21:46 +09:00
Author: https://github.com/doctor-rd
Commit: 7d579b04c5
Pull-request: https://github.com/SerenityOS/serenity/pull/8965
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/awesomekling
3 changed files with 15 additions and 3 deletions
|
@ -32,6 +32,7 @@ int main(int argc, char** argv)
|
|||
parser.parse(argc, argv);
|
||||
|
||||
String file_to_edit_full_path;
|
||||
auto config_filename = MainWidget::open_config_file()->filename();
|
||||
|
||||
if (file_to_edit) {
|
||||
FileArgument parsed_argument(file_to_edit);
|
||||
|
@ -47,7 +48,7 @@ int main(int argc, char** argv)
|
|||
}
|
||||
}
|
||||
|
||||
if (unveil(Core::StandardPaths::config_directory().characters(), "rw") < 0) {
|
||||
if (unveil(config_filename.characters(), "rwc") < 0) {
|
||||
perror("unveil");
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue