aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Archiver
diff options
context:
space:
mode:
authorDr Scofield2009-04-17 08:11:34 +0000
committerDr Scofield2009-04-17 08:11:34 +0000
commit3b70d14e620826db8faa77537d7d3972bc3d077f (patch)
treeb606db8d4f3fc50b930d3e5a9a3af605029424da /OpenSim/Region/CoreModules/World/Archiver
parent* Some more work on refactoring configs; (diff)
downloadopensim-SC-3b70d14e620826db8faa77537d7d3972bc3d077f.zip
opensim-SC-3b70d14e620826db8faa77537d7d3972bc3d077f.tar.gz
opensim-SC-3b70d14e620826db8faa77537d7d3972bc3d077f.tar.bz2
opensim-SC-3b70d14e620826db8faa77537d7d3972bc3d077f.tar.xz
fixes System.UnauthorizedAccessExceptions when trying to load OARs from
read-only files on linux.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver')
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs4
1 files changed, 2 insertions, 2 deletions
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
425 { 425 {
426 if (File.Exists(path)) 426 if (File.Exists(path))
427 { 427 {
428 return new FileStream(path, FileMode.Open); 428 return new FileStream(path, FileMode.Open, FileAccess.Read);
429 } 429 }
430 else 430 else
431 { 431 {
432 Uri uri = new Uri(path); // throw exception if not valid URI 432 Uri uri = new Uri(path); // throw exception if not valid URI
433 if (uri.Scheme == "file") 433 if (uri.Scheme == "file")
434 { 434 {
435 return new FileStream(uri.AbsolutePath, FileMode.Open); 435 return new FileStream(uri.AbsolutePath, FileMode.Open, FileAccess.Read);
436 } 436 }
437 else 437 else
438 { 438 {