Compare commits

...

2 Commits

Author SHA1 Message Date
UbitUmarov
64408c9395 avoid potencial on forced replace of files in flotsam cache problem 2026-05-02 00:06:47 +01:00
UbitUmarov
5b2ca76fcb avoid some future problem, thx Deiji 2026-04-30 05:53:46 +01:00
2 changed files with 7 additions and 6 deletions

View File

@@ -994,7 +994,8 @@ namespace OpenSim.Region.CoreModules.Asset
try
{
// If the file is already cached, don't cache it, just touch it so access time is updated
if (!replace && File.Exists(filename))
bool fileExists = File.Exists(filename);
if (!replace && fileExists)
{
if (m_updateFileTimeOnCacheHit)
UpdateFileLastAccessTime(filename);
@@ -1031,7 +1032,7 @@ namespace OpenSim.Region.CoreModules.Asset
try
{
if(replace)
if(fileExists)
File.Delete(filename);
File.Move(tempname, filename);
}

View File

@@ -2942,7 +2942,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
if(obj is OTOpndBinOp)
sb.Append(')');
sb.Append('.');
sb.Append(field.Name);
sb.Append(this.field.Name);
return sb.ToString();
}
}
@@ -3548,9 +3548,9 @@ namespace OpenSim.Region.ScriptEngine.Yengine
{
get
{
if(field.DeclaringType == typeof(ScriptBaseClass))
return field.Name;
return field.DeclaringType.Name + "." + field.Name;
if(this.field.DeclaringType == typeof(ScriptBaseClass))
return this.field.Name;
return this.field.DeclaringType.Name + "." + this.field.Name;
}
}
}