claunia / plist-cil

C#/.NET parser for Apple and GnuStep Property List (aka plist), based on Java's dd-plist
Other
54 stars 17 forks source link

Always create a new file when writing to disk. #11

Closed qmfrederik closed 8 years ago

qmfrederik commented 8 years ago

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!