-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
File.cpp: revert get_parent_dir change #14086
Conversation
The changes introduced in 6a570ae simplified the implementation of the function Test code:
|
Also, since the sys_fs stuff now keeps track of the the mount paths passed to |
If you want to organize badly origanized paths you may add another function then, it's not this function's purpose. |
But it was even not properly getting the parent dir of some given paths. 😆 |
Examples or it didn't happen. |
It's not a bug, both paths mean the same thing, with the difference being filesystems typically also check for BB's existence in case it's symlinking to another path. |
I think path normalization should be a separate function |
string view version of the argument path, use with care.
Should fix #14031 .
Tagging @brian218 to explain the change.
Issues's problem is that std::path("$locks") returns "$locks/" with japanese locale.
Keep in mind that we already call setlocal("C") on startup so some code overwrites it.
Some places in code also use the pattern
(file_path.substr(get_parent_dir(file2_path_in_x_directory, x_times).size()) == trail path from parent directory)
which breaks with the code on master.