From 3b70d14e620826db8faa77537d7d3972bc3d077f Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Fri, 17 Apr 2009 08:11:34 +0000 Subject: fixes System.UnauthorizedAccessExceptions when trying to load OARs from read-only files on linux. --- OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 1e57be0..efc4057 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -425,14 +425,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver { if (File.Exists(path)) { - return new FileStream(path, FileMode.Open); + return new FileStream(path, FileMode.Open, FileAccess.Read); } else { Uri uri = new Uri(path); // throw exception if not valid URI if (uri.Scheme == "file") { - return new FileStream(uri.AbsolutePath, FileMode.Open); + return new FileStream(uri.AbsolutePath, FileMode.Open, FileAccess.Read); } else { -- cgit v1.1