mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Change File::DeleteDir return value
Makes File::DeleteDir return true when attempting to delete a nonexistent path. The purpose of DeleteDir is to ensure the path doesn't exist after the call, which is better reflected by the new return value. Additionally, none of the current callers actually check the return value so this won't break any existing code.
This commit is contained in:
parent
a34823df61
commit
c434eefe94
@ -257,6 +257,13 @@ bool DeleteDir(const std::string& filename)
|
||||
{
|
||||
INFO_LOG_FMT(COMMON, "DeleteDir: directory {}", filename);
|
||||
|
||||
// Return true because we care about the directory not being there, not the actual delete.
|
||||
if (!File::Exists(filename))
|
||||
{
|
||||
WARN_LOG_FMT(COMMON, "DeleteDir: {} does not exist", filename);
|
||||
return true;
|
||||
}
|
||||
|
||||
// check if a directory
|
||||
if (!IsDirectory(filename))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user