private void CreateTempDir()
{
if (Directory.Exists(_tempDirectory))
{
// clear its content just to be sure that no parasitic files are left
Directory.Delete(_tempDirectory, true);
}
try
{
Directory.CreateDirectory(_tempDirectory);
}
catch (Exception) // UnauthorizedAccessException and IOEXception
{
UpdateUI("Unable to create temporary directory: " + _tempDirectory, true);
throw new AbortException();
}
progressUpdate.Value = 10;
}