mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
Fix #9865: removing files with the console always failed
This commit is contained in:
parent
1ed0b35520
commit
a4a819c983
@ -458,8 +458,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);
|
||||
|
Loading…
Reference in New Issue
Block a user