bobvanderlinden / sharpfilesystem

A virtual file system for .NET written in C#
MIT License
285 stars 69 forks source link

Update before dispose #17

Open git-iason opened 7 years ago

git-iason commented 7 years ago

I added support to call BeginUpdate before and CommitUpdate after any action that modifies the file system.

Without that, the SharpZip library threw exceptions when attempting to create a file or directory because BeginInvoke had not been called. Further, CommitUpdate was only being called on Dispose(), so updates would not be available until the filesystem had been disposed, and then re instantiated.