From b7d78f27beb112feae22f0ec89f4b8af2d5dde0a Mon Sep 17 00:00:00 2001 From: museun Date: Sun, 3 Mar 2013 18:38:29 -0500 Subject: 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. --- src/htm/Main.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- cgit 1.4.1