[mono-android] UnauthorizedAccessException 4.0.3
Jonathan Pryor
jonp at xamarin.com
Tue Feb 21 17:38:40 UTC 2012
On Feb 21, 2012, at 12:34 PM, thenextman wrote:
> My code (which was written in, probably 1.0, but I can't remember exactly) looked like this:
>
> private static void EnsureDirectory(string path)
> {
> if (!System.IO.Directory.Exists(path))
> {
> System.IO.Directory.CreateDirectory(path);
> }
> }
>
> Where path was simply "log".
I'm not sure why that would ever work, as the Current Working Directory is never set (iirc), and thus would default to /, which you can't write to. :-/
- Jon
More information about the Monodroid
mailing list