mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 09:18:40 +12:00
Include trailing separators in section split
This fixes the case on Windows where one of the paths ends up consisting only of a drive letter and no trailing slash - in which case Windows treats it as "current directory on drive X" and not "root of drive X" and GetFileAttributes throws an invalid param error
This commit is contained in:
parent
f8b3c48af7
commit
fbbad7c851
1 changed files with 2 additions and 1 deletions
|
@ -238,7 +238,8 @@ namespace gui
|
||||||
{
|
{
|
||||||
// get Icon for the gs_frame from path. this handles presumably all possible use cases
|
// get Icon for the gs_frame from path. this handles presumably all possible use cases
|
||||||
const QString qpath = qstr(path);
|
const QString qpath = qstr(path);
|
||||||
const std::string path_list[] = { path, sstr(qpath.section("/", 0, -2)), sstr(qpath.section("/", 0, -3)) };
|
const std::string path_list[] = { path, sstr(qpath.section("/", 0, -2, QString::SectionIncludeTrailingSep)),
|
||||||
|
sstr(qpath.section("/", 0, -3, QString::SectionIncludeTrailingSep)) };
|
||||||
|
|
||||||
for (const std::string& pth : path_list)
|
for (const std::string& pth : path_list)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue