mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
fixes System.UnauthorizedAccessExceptions when trying to load OARs from
read-only files on linux.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user