diff options
author | Dr Scofield | 2009-04-17 08:11:34 +0000 |
---|---|---|
committer | Dr Scofield | 2009-04-17 08:11:34 +0000 |
commit | 3b70d14e620826db8faa77537d7d3972bc3d077f (patch) | |
tree | b606db8d4f3fc50b930d3e5a9a3af605029424da /OpenSim/Region | |
parent | * Some more work on refactoring configs; (diff) | |
download | opensim-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')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 4 |
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 | { |