mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-06 12:40:24 +00:00
Common/FatFsUtil: Close temp file before deleting it on conversion failure.
This commit is contained in:
parent
fe26b54efd
commit
e2bd7d1d95
@ -535,7 +535,10 @@ bool SyncSDFolderToSDImage(const std::function<bool()>& cancelled, bool determin
|
|||||||
}
|
}
|
||||||
|
|
||||||
// delete temp file in failure case
|
// 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))
|
if (!image.Resize(size))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user