diff --git a/Shell/main.cpp b/Shell/main.cpp index 9c4245a45d..c6b201c99c 100644 --- a/Shell/main.cpp +++ b/Shell/main.cpp @@ -978,8 +978,8 @@ void load_history() void save_history() { - auto history_file = Core::File::construct(get_history_path()); - if (!history_file->open(Core::IODevice::WriteOnly)) + auto history_file = Core::File::open(get_history_path(), Core::IODevice::WriteOnly, 0600); + if (!history_file) return; for (const auto& line : editor.history()) { history_file->write(line);