mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 12:12:50 +01:00
VFS: fix missing path deliminators
This commit is contained in:
parent
ef0bee9228
commit
84753db574
@ -49,7 +49,6 @@ bool vfs::mount(std::string_view vpath, std::string_view path)
|
||||
return false;
|
||||
}
|
||||
|
||||
const bool delim_suffixed = path.ends_with(fs::delim);
|
||||
std::string final_path = fs::resolve_path(path);
|
||||
|
||||
if (final_path.empty())
|
||||
@ -58,7 +57,7 @@ bool vfs::mount(std::string_view vpath, std::string_view path)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!final_path.ends_with(fs::delim) && delim_suffixed)
|
||||
if (!final_path.ends_with(fs::delim[0]) && !final_path.ends_with(fs::delim[1]) && (path.ends_with(fs::delim[0]) || path.ends_with(fs::delim[1])))
|
||||
{
|
||||
final_path += '/';
|
||||
}
|
||||
@ -83,7 +82,7 @@ bool vfs::mount(std::string_view vpath, std::string_view path)
|
||||
{
|
||||
// Mounting completed
|
||||
list.back()->path = std::move(final_path);
|
||||
vfs_log.notice("Mounted path \"%s\" to \"%s\"", vpath_backup, final_path);
|
||||
vfs_log.notice("Mounted path \"%s\" to \"%s\"", vpath_backup, list.back()->path);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user