Skip to content

Prevent Overwriting of Configuration File by Adding Existence Check #7684

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

Closed
wants to merge 1 commit into from

Conversation

Shubhk209
Copy link

Fix: Check if configuration file exists before creating it

Prevent overwriting existing configuration (e.g., appsettings.json). Only create the file if it doesn't already exist.
Ensure default values are used only when the file is missing, keeping user settings intact.

Fix: Check if configuration file exists before creating it

Prevent overwriting existing configuration (e.g., appsettings.json).
Only create the file if it doesn't already exist.
Ensure default values are used only when the file is missing, keeping user settings intact.
@RomanovM
Copy link
Contributor

No need to check this, it's inside INopFileProvider.CreateFile() method

@RomanovM RomanovM closed this Apr 25, 2025
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.

2 participants