Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base: Some cleanups by moving /res folders to /usr/share and removing some useless config files #25606

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
4 changes: 2 additions & 2 deletions Userland/Games/MasterWord/WordGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void WordGame::read_words()
m_words.clear();

auto try_load_words = [&]() -> ErrorOr<void> {
auto response = TRY(Core::File::open("/res/words.txt"sv, Core::File::OpenMode::Read));
auto response = TRY(Core::File::open("/usr/share/MasterWord/words.txt"sv, Core::File::OpenMode::Read));
timschumi marked this conversation as resolved.
Show resolved Hide resolved
auto words_file = TRY(Core::InputBufferedFile::create(move(response)));
Array<u8, 128> buffer;

Expand All @@ -189,7 +189,7 @@ void WordGame::read_words()
};

if (try_load_words().is_error()) {
GUI::MessageBox::show(nullptr, "Could not read /res/words.txt.\nPlease ensure this file exists and restart MasterWord."sv, "MasterWord"sv);
GUI::MessageBox::show(nullptr, "Could not read /usr/share/MasterWord/words.txt.\nPlease ensure this file exists and restart MasterWord."sv, "MasterWord"sv);
exit(0);
}
}
Expand Down
1 change: 1 addition & 0 deletions Userland/Games/MasterWord/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)

TRY(Core::System::unveil("/tmp/session/%sid/portal/launch", "rw"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/usr/share/MasterWord", "r"));
TRY(Core::System::unveil(nullptr, nullptr));

auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-masterword"sv));
Expand Down