private bool CreateLockFile()
{
bool success = false;
try
{
if (Directory.Exists(_rootDataDirectory))
{
var lockFilePath = Path.Combine(_rootDataDirectory, LockFile);
if (!File.Exists(lockFilePath))
{
File.Create(lockFilePath).Close();
success = true;
}
}
}
catch (Exception e)
{
Logging.Error("An error occured creating the profile lock file.", e);
}
return success;
}