mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-05-07 13:37:46 +00:00
reduce check for raw device
This commit is contained in:
parent
570b2bddca
commit
79d0e0eb3c
1 changed files with 7 additions and 0 deletions
|
|
@ -1127,6 +1127,13 @@ bool fs::is_optical_raw_device(const std::string& path)
|
|||
|
||||
bool fs::get_optical_raw_device(const std::string& path, std::string* raw_device)
|
||||
{
|
||||
// Skip a useless check to detect an optical raw device if navigating on subfolders (e.g. C:/subfolder_1/subfolder_2/), it means we are on a hdd/ssd.
|
||||
// A path for an optical drive should include only the drive letter (e.g. E:/)
|
||||
if (path.find_first_of(":") != path.find_last_not_of(delim))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fs::is_optical_raw_device(path))
|
||||
{
|
||||
if (raw_device)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue