mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 19:24:51 +00:00
[App] Remove possible leftover temporary files.
This commit is contained in:
@@ -334,11 +334,15 @@ public partial class ImportRoms : ComponentBase
|
||||
KnownOnlyChecked,
|
||||
RemoveFilesChecked);
|
||||
|
||||
string tmpFile = Path.Combine(Settings.Settings.Current.RepositoryPath,
|
||||
Path.GetRandomFileName());
|
||||
|
||||
worker.ImportAndHashRom(reader.OpenEntryStream(),
|
||||
reader.Entry.Key,
|
||||
Path.Combine(Settings.Settings.Current.RepositoryPath,
|
||||
Path.GetFileName(Path.GetTempFileName())),
|
||||
tmpFile,
|
||||
reader.Entry.Size);
|
||||
|
||||
if(File.Exists(tmpFile)) File.Delete(tmpFile);
|
||||
}
|
||||
}
|
||||
catch(InvalidOperationException) {}
|
||||
|
||||
Reference in New Issue
Block a user