mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-01 12:08:12 +00:00
System.cpp: Replace std::filesystem usage (#12474)
This commit is contained in:
parent
2880370047
commit
47f3740a70
@ -43,7 +43,6 @@
|
||||
#include <memory>
|
||||
#include <regex>
|
||||
#include <optional>
|
||||
#include <filesystem>
|
||||
|
||||
#include "Utilities/JIT.h"
|
||||
|
||||
@ -1139,16 +1138,19 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool
|
||||
bdvd_dir.push_back('/');
|
||||
}
|
||||
|
||||
if (fs::is_dir(bdvd_dir) && std::filesystem::is_empty(bdvd_dir))
|
||||
if (!fs::is_file(bdvd_dir + "PS3_DISC.SFB"))
|
||||
{
|
||||
// Ignore empty dir. We will need it later for disc games in dev_hdd0.
|
||||
bdvd_dir.clear();
|
||||
sys_log.notice("Ignoring empty vfs BDVD directory: '%s'", bdvd_dir);
|
||||
}
|
||||
else if (!fs::is_file(bdvd_dir + "PS3_DISC.SFB"))
|
||||
{
|
||||
// Unuse if invalid
|
||||
sys_log.error("Failed to use custom BDVD directory: '%s'", bdvd_dir);
|
||||
if (fs::get_dir_size(bdvd_dir) == 0)
|
||||
{
|
||||
// Ignore empty dir. We will need it later for disc games in dev_hdd0.
|
||||
sys_log.notice("Ignoring empty vfs BDVD directory: '%s'", bdvd_dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Unuse if invalid
|
||||
sys_log.error("Failed to use custom BDVD directory: '%s'", bdvd_dir);
|
||||
}
|
||||
|
||||
bdvd_dir.clear();
|
||||
}
|
||||
}
|
||||
@ -1441,7 +1443,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool add_only, bool
|
||||
// Disc game located in dev_hdd0/game
|
||||
bdvd_dir = g_cfg_vfs.get(g_cfg_vfs.dev_bdvd, rpcs3::utils::get_emu_dir());
|
||||
|
||||
if (!fs::is_dir(bdvd_dir) || !std::filesystem::is_empty(bdvd_dir))
|
||||
if (fs::get_dir_size(bdvd_dir))
|
||||
{
|
||||
sys_log.error("Failed to load disc game from dev_hdd0. The virtual bdvd_dir path does not exist or the directory is not empty: '%s'", bdvd_dir);
|
||||
return game_boot_result::invalid_bdvd_folder;
|
||||
|
Loading…
Reference in New Issue
Block a user