1
0
Fork 0

Fix #9865: removing files with the console always failed

pull/10424/head
Rubidium 2023-01-15 10:53:32 +01:00 committed by Michael Lutz
parent 87d74389fb
commit f37b6cb17f
1 changed files with 2 additions and 2 deletions

View File

@ -454,8 +454,8 @@ DEF_CONSOLE_CMD(ConRemove)
_console_file_list.ValidateFileList();
const FiosItem *item = _console_file_list.FindItem(file);
if (item != nullptr) {
if (!FiosDelete(item->name)) {
IConsolePrint(CC_ERROR, "Failed to delete '{}'.", file);
if (unlink(item->name) != 0) {
IConsolePrint(CC_ERROR, "Failed to delete '{}'.", item->name);
}
} else {
IConsolePrint(CC_ERROR, "'{}' could not be found.", file);