diff options
author | museun <museun@outlook.com> | 2013-03-03 18:38:29 -0500 |
---|---|---|
committer | museun <museun@outlook.com> | 2013-03-03 18:52:23 -0500 |
commit | b7d78f27beb112feae22f0ec89f4b8af2d5dde0a (patch) | |
tree | 4be85d640b6b22320998c8a32136da9c04f6eb34 /src | |
parent | 8faa0e65189e2ba677b2618f1b882e51b5caf3d1 (diff) |
HTM was throwing an exception for ReadOnly files.
So, to fix this an explicit FileAccess had to be set. Package.Open uses the default FileShare.None option. This causes a conflict and throws the 'UnauthorizedAccessException' exception. So, we just tell it that we are there to read it and everything is fine.
Diffstat (limited to 'src')
-rw-r--r-- | src/htm/Main.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/htm/Main.cs b/src/htm/Main.cs index cc33e206..e3ae04cf 100644 --- a/src/htm/Main.cs +++ b/src/htm/Main.cs @@ -281,7 +281,7 @@ namespace thememan try { - using (Package zip = Package.Open(zipFile.FullName, FileMode.Open)) + using (Package zip = Package.Open(zipFile.FullName, FileMode.Open, FileAccess.Read)) { PackagePartCollection parts = zip.GetParts(); |