dont try to get objekt

master
Christopher 2020-07-08 01:39:11 +02:00
parent bd9124da1f
commit a9f5e997ad
1 changed files with 9 additions and 16 deletions

View File

@ -67,27 +67,20 @@ namespace OpenSim.Modules.DataValue.Storage
private string getFilePath(String host, String index) private string getFilePath(String host, String index)
{ {
SceneObjectGroup _host = m_scene.GetSceneObjectGroup(host); string _nameSpace = host.Trim().ToUpper().Replace("-", "");
if (_host != null) if (!Directory.Exists(m_dataValueDirectory))
{ Directory.CreateDirectory(m_dataValueDirectory);
string _nameSpace = _host.GroupID.ToString().Trim().ToUpper().Replace("-", "");
if (!Directory.Exists(m_dataValueDirectory)) if (!Directory.Exists(m_dataValueDirectory + "/" + _nameSpace))
Directory.CreateDirectory(m_dataValueDirectory); Directory.CreateDirectory(m_dataValueDirectory + "/" + _nameSpace);
if (!Directory.Exists(m_dataValueDirectory + "/" + _nameSpace)) string _storageKey = BitConverter.ToString(new MD5CryptoServiceProvider().ComputeHash(ASCIIEncoding.ASCII.GetBytes(index.Trim().ToUpper()))).Replace("-", "");
Directory.CreateDirectory(m_dataValueDirectory + "/" + _nameSpace);
string _storageKey = BitConverter.ToString(new MD5CryptoServiceProvider().ComputeHash(ASCIIEncoding.ASCII.GetBytes(index.Trim().ToUpper()))).Replace("-", ""); if (m_enabledCompress)
return m_dataValueDirectory + "/" + _nameSpace + "/" + _storageKey + ".gz";
if (m_enabledCompress) return m_dataValueDirectory + "/" + _nameSpace + "/" + _storageKey + ".txt";
return m_dataValueDirectory + "/" + _nameSpace + "/" + _storageKey + ".gz";
return m_dataValueDirectory + "/" + _nameSpace + "/" + _storageKey + ".txt";
}
return null;
} }
} }
} }