mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 11:14:45 +00:00
[App] Remove possible leftover temporary files.
This commit is contained in:
@@ -432,11 +432,15 @@ public sealed partial class ImportRomFolderViewModel : ViewModelBase
|
||||
|
||||
Dispatcher.UIThread.Post(() => Importers.Add(model));
|
||||
|
||||
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