Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VFS: fix missing path deliminators #11365

Merged
merged 2 commits into from
Jan 12, 2022
Merged

VFS: fix missing path deliminators #11365

merged 2 commits into from
Jan 12, 2022

Conversation

Megamouse
Copy link
Contributor

@Megamouse Megamouse commented Jan 12, 2022

fixes #11360

@@ -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) && (path.ends_with('/') || path.ends_with('\\')))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!final_path.ends_with(fs::delim) && (path.ends_with('/') || path.ends_with('\\')))
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])))

@Nekotekina
Copy link
Member

Actually need also change std::filesystem::path to std::filesystem::u8path in File.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Games do not boot after #11178
2 participants