Skip to content

Fix #2140: Catch UnauthorizedAccessException for read-only file errors#2326

Open
kellyelton wants to merge 1 commit into
masterfrom
oi/2140/catch-readonly-file-errors
Open

Fix #2140: Catch UnauthorizedAccessException for read-only file errors#2326
kellyelton wants to merge 1 commit into
masterfrom
oi/2140/catch-readonly-file-errors

Conversation

@kellyelton

Copy link
Copy Markdown
Member

Fixes #2140

Problem: When feeds.txt or other config files are read-only or have restricted permissions, XFile.OpenFile throws an unhandled UnauthorizedAccessException.

Solution: Add UnauthorizedAccessException to the catch block in XFile.OpenFile, matching the existing IOException handling. This prevents unhandled exceptions and logs a clear warning when files can't be opened due to permission issues.

- XFile.OpenFile now catches UnauthorizedAccessException in addition to IOException
- Prevents unhandled exceptions when feeds.txt or other config files are read-only
- Logs a clear warning message for access denied / read-only scenarios
@kellyelton kellyelton added the octgn-issue-bot PRs created by the OCTGN issue bot label Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

octgn-issue-bot PRs created by the OCTGN issue bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Catch read-only file lock errors when trying to access feeds.txt and other config assets

1 participant