timheuer / taglib-sharp-portable

.NET Portable Class Library implementation of TagLib# (forked from TagLib# main project)
Other
58 stars 33 forks source link

Ensure streams can be closed #22

Closed sjp closed 3 years ago

sjp commented 7 years ago

Hi!

I've tried using this version of taglib-sharp but discovered that it keeps file handle open when using IFileAbstraction implementations like LocalFileAbstraction.

This is caused by the underlying streams never closing, which I see was introduced in #11 . This is particularly important for my use cases.

I've introduced a fix for this, and also now guard against non-writable streams being used when setting the Mode to AccessMode.Write. Some minor changes were made to StreamFileAbstraction and LocalFileAbstraction.

Additionally I have fixed up some of the tests and improved support for some XMP metadata.