mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
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
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user