Closed coenm closed 3 months ago
var filename = Path.Combine(basePath, FILENAME);
if (_fileSystem.File.Exists(filename))
{
return filename;
}
var filenameTemplate = Path.Combine(_appDataPathProvider.AppResourcesPath, FILENAME);
if (_fileSystem.File.Exists(filenameTemplate))
{
try
{
_fileSystem.File.Copy(filenameTemplate, filename);
}
catch (Exception e)
{
_logger.LogError(e, "Could not copy default {FILENAME} to {AppDataPath}", FILENAME, _appDataPathProvider.AppDataPath);
}
if (_fileSystem.File.Exists(filename))
{
return filename;
}
}
throw new ConfigurationFileNotFoundException(filename);
When starting RepoM (for instance, at the first time after installation), it requires some files to be present at
%appdata%\Roaming\RepoM
. When these do not exist, RepoM crashes