Skip to content

Only change readonly if saved filename matches opened filename #8852

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

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

radarhere
Copy link
Member

Resolves #8828

#3724 ensured that an image was mutable when saving, to fix the scenario where a user is opening an image from a file and then saving it back to the same file.

This reverses that change slightly, only ensuring an image is mutable when saving if it has the same filename as the opened image.

@hugovk hugovk added the automerge Automatically merge PRs that are ready label Apr 1, 2025
@mergify mergify bot merged commit 6417841 into python-pillow:main Apr 1, 2025
55 checks passed
@radarhere radarhere deleted the save branch April 1, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge PRs that are ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image.save() causes images created by Image.frombuffer() to stop reflecting changes in that buffer
2 participants