in src/IdFix/Files.cs [25:48]
public Files(string seed = null)
{
if (string.IsNullOrEmpty(seed))
{
seed = new Regex(@"[/:]", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant).Replace(DateTime.Now.ToString(), "-");
}
this._fileBase = seed;
// Test if the user has permissions to write to the current directory.
try
{
var testFileName = "test.txt";
File.WriteAllText(testFileName, "test");
File.Delete(testFileName);
}
catch
{
_directory = Path.GetDirectoryName(Path.GetTempPath());
if (!_directory.EndsWith(@"\"))
{
_directory += @"\";
}
}
}