fixes System.UnauthorizedAccessExceptions when trying to load OARs from
read-only files on linux.0.6.5-rc1
parent
bbe1e19696
commit
3b70d14e62
|
@ -425,14 +425,14 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
{
|
{
|
||||||
if (File.Exists(path))
|
if (File.Exists(path))
|
||||||
{
|
{
|
||||||
return new FileStream(path, FileMode.Open);
|
return new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Uri uri = new Uri(path); // throw exception if not valid URI
|
Uri uri = new Uri(path); // throw exception if not valid URI
|
||||||
if (uri.Scheme == "file")
|
if (uri.Scheme == "file")
|
||||||
{
|
{
|
||||||
return new FileStream(uri.AbsolutePath, FileMode.Open);
|
return new FileStream(uri.AbsolutePath, FileMode.Open, FileAccess.Read);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue