Skip to content

test: Add support for the -s option#26566

Open
LucasChollet wants to merge 1 commit intoSerenityOS:masterfrom
LucasChollet:test-s
Open

test: Add support for the -s option#26566
LucasChollet wants to merge 1 commit intoSerenityOS:masterfrom
LucasChollet:test-s

Conversation

@LucasChollet
Copy link
Member

No description provided.

@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Jan 22, 2026
if (!FileSystem::exists(m_path))
return false;

auto maybe_size = FileSystem::size_from_stat(m_path);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing two syscalls (one for "exists" and one to get the size) seems unnecessary. stat() tells you if it exists as well.

Maybe call Core::System::stat and then do the "or existing directory" as well?

@nico nico added ⏳ pr-waiting-for-author PR is blocked by feedback / code changes from the author and removed 👀 pr-needs-review PR needs review from a maintainer or community member labels Feb 5, 2026
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!

@github-actions github-actions bot added the stale label Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⏳ pr-waiting-for-author PR is blocked by feedback / code changes from the author stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants