[PR #11] [MERGED] Always create a new file when writing to disk. #45

Open
opened 2026-01-30 21:26:53 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/claunia/plist-cil/pull/11
Author: @qmfrederik
Created: 6/3/2016
Status: Merged
Merged: 6/22/2016
Merged by: @claunia

Base: masterHead: fixes/create-new-file


📝 Commits (1)

  • bf031fa Always create a new file when writing to disk.

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 plist-cil/PropertyListParser.cs (+4 -1)

📄 Description

Previously, plist-cil used outFile.Open(FileMode.OpenOrCreate. This had the side effect of, when the old file was larger than the new file, leaving some junk at the end of the file.

Using FileMode.Create fixes that (and if the file already exists, it is overwritten).

@claunia Would be great if you have some time to go over these pull requests :-)

Thanks!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/claunia/plist-cil/pull/11 **Author:** [@qmfrederik](https://github.com/qmfrederik) **Created:** 6/3/2016 **Status:** ✅ Merged **Merged:** 6/22/2016 **Merged by:** [@claunia](https://github.com/claunia) **Base:** `master` ← **Head:** `fixes/create-new-file` --- ### 📝 Commits (1) - [`bf031fa`](https://github.com/claunia/plist-cil/commit/bf031fadab8ef58db52f9c305dbf436ea1d8c33d) Always create a new file when writing to disk. ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `plist-cil/PropertyListParser.cs` (+4 -1) </details> ### 📄 Description Previously, plist-cil used `outFile.Open(FileMode.OpenOrCreate`. This had the side effect of, when the old file was larger than the new file, leaving some junk at the end of the file. Using `FileMode.Create` fixes that (and if the file already exists, it is overwritten). @claunia Would be great if you have some time to go over these pull requests :-) Thanks! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-30 21:26:53 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: claunia/plist-cil#45