Don't try and update the access time of a file that is actively being cached.
This may cause IOErrors on Windows. Aims to help with http://opensimulator.org/mantis/view.php?id=60030.7.4.1
parent
da4819a170
commit
dec6ad2933
|
@ -261,10 +261,14 @@ namespace Flotsam.RegionModules.AssetCache
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// If the file is already cached, don't cache it, just touch it so access time is updated
|
// If the file is already cached just update access time.
|
||||||
if (File.Exists(filename))
|
if (File.Exists(filename))
|
||||||
{
|
{
|
||||||
File.SetLastAccessTime(filename, DateTime.Now);
|
lock (m_CurrentlyWriting)
|
||||||
|
{
|
||||||
|
if (!m_CurrentlyWriting.Contains(filename))
|
||||||
|
File.SetLastAccessTime(filename, DateTime.Now);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue