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=6003
0.7.4.1
Justin Clark-Casey (justincc) 2012-05-04 22:57:33 +01:00
parent da4819a170
commit dec6ad2933
1 changed files with 6 additions and 2 deletions

View File

@ -261,10 +261,14 @@ namespace Flotsam.RegionModules.AssetCache
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))
{
File.SetLastAccessTime(filename, DateTime.Now);
lock (m_CurrentlyWriting)
{
if (!m_CurrentlyWriting.Contains(filename))
File.SetLastAccessTime(filename, DateTime.Now);
}
}
else
{