Skip to content

[#47] Report read errors in pgmoneta_ext_get_file() - #48

Open
Pranav-error wants to merge 1 commit into
pgmoneta:mainfrom
Pranav-error:get-file-read-error
Open

Pranav-error wants to merge 1 commit into
pgmoneta:mainfrom
Pranav-error:get-file-read-error

Conversation

@Pranav-error

Copy link
Copy Markdown
Collaborator

Fixes #47.

Move the ferror() check after the read loop, so a failed fread() raises an error instead of returning partial data.

On PG 14: reading a directory now gives Could not read file "...": Is a directory (main returns ''), and a 20000-byte file still matches pg_read_binary_file(). lib.c also compiles against PG 19 headers.

Copilot AI balanced review requested due to automatic review settings December 1, 2026 17:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pgmoneta_ext_get_file() returns empty/partial data on a read error

2 participants