mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-16 12:58:33 +02:00
misc cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3942 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -206,7 +206,10 @@ bool SDCardCreate(u32 disk_size /*in MB*/, char* filename)
|
||||
|
||||
f = fopen(filename, "wb");
|
||||
if (!f)
|
||||
{
|
||||
ERROR_LOG(COMMON, "could not create file '%s', aborting...\n", filename);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* here's the layout:
|
||||
*
|
||||
@ -246,7 +249,8 @@ bool SDCardCreate(u32 disk_size /*in MB*/, char* filename)
|
||||
|
||||
FailWrite:
|
||||
ERROR_LOG(COMMON, "could not write to '%s', aborting...\n", filename);
|
||||
unlink(filename);
|
||||
if (unlink(filename) < 0)
|
||||
ERROR_LOG(COMMON, "unlink(%s) failed\n%s", filename, GetLastErrorMsg());
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user