mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Common/FatFsUtil: Close temp file before deleting it on conversion failure.
This commit is contained in:
@@ -535,7 +535,10 @@ bool SyncSDFolderToSDImage(const std::function<bool()>& cancelled, bool determin
|
||||
}
|
||||
|
||||
// delete temp file in failure case
|
||||
Common::ScopeGuard image_delete_guard{[&] { File::Delete(temp_image_path); }};
|
||||
Common::ScopeGuard image_delete_guard{[&] {
|
||||
image.Close();
|
||||
File::Delete(temp_image_path);
|
||||
}};
|
||||
|
||||
if (!image.Resize(size))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user