check for backup symbol file before trying to restore

This commit is contained in:
Oluwatoni Solarin-Sodara
2019-04-01 11:11:04 +01:00
parent 10e9a626a9
commit 014bb61ffd
@@ -109,8 +109,11 @@ namespace Coverlet.Core.Helpers
RetryHelper.Retry(() =>
{
File.Copy(backupSymbolPath, Path.ChangeExtension(module, ".pdb"), true);
File.Delete(backupSymbolPath);
if (File.Exists(backupSymbolPath))
{
File.Copy(backupSymbolPath, Path.ChangeExtension(module, ".pdb"), true);
File.Delete(backupSymbolPath);
}
}, retryStrategy, 10);
}