From: Sebastien Pouliot Date: Fri, 5 Sep 2008 13:35:30 +0000 (-0000) Subject: 2008-09-05 Sebastien Pouliot X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=bafa554120b10adec3ab15af2dab49b3026da47c;p=mono.git 2008-09-05 Sebastien Pouliot * MoonIsolatedStorageFile.cs: Add calls to PreCheck inside EndRead and EndWrite methods. * MoonIsolatedStorageFileStream.cs: Throw an IsolatedStorageException when DeleteFile is called on an unexisting file. svn path=/trunk/mcs/; revision=112374 --- diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog b/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog index d7ad28631f0..48d52be55c0 100644 --- a/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog +++ b/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog @@ -1,3 +1,10 @@ +2008-09-05 Sebastien Pouliot + + * MoonIsolatedStorageFile.cs: Add calls to PreCheck inside EndRead + and EndWrite methods. + * MoonIsolatedStorageFileStream.cs: Throw an IsolatedStorageException + when DeleteFile is called on an unexisting file. + 2008-08-22 Sebastien Pouliot * MoonIsolatedStorageFile.cs: Implement Remove. Add a bunch of FIXME diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFile.cs b/mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFile.cs index 0d494392de6..58c484d3db8 100644 --- a/mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFile.cs +++ b/mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFile.cs @@ -167,7 +167,10 @@ namespace System.IO.IsolatedStorage { public void DeleteFile (string file) { PreCheck (); - File.Delete (Verify (file)); + string checked_filename = Verify (file); + if (!File.Exists (checked_filename)) + throw new IsolatedStorageException ("File does not exists"); + File.Delete (checked_filename); } public void Dispose () diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFileStream.cs b/mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFileStream.cs index 3ac4f5d9c67..8a0094470e5 100644 --- a/mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFileStream.cs +++ b/mcs/class/corlib/System.IO.IsolatedStorage/MoonIsolatedStorageFileStream.cs @@ -184,11 +184,13 @@ namespace System.IO.IsolatedStorage { public override int EndRead (IAsyncResult asyncResult) { + container.PreCheck (); return base.EndRead (asyncResult); } public override void EndWrite (IAsyncResult asyncResult) { + container.PreCheck (); base.EndWrite (asyncResult); } }