-
Notifications
You must be signed in to change notification settings - Fork 41
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
cwk_path_is_absolute returns an incorrect result #24
Comments
Hi @kampeador, thank you very much for your tests! I really appreciate it. I believe the first five tests fail because cwalk consideres these to be absolute on windows too (please correct me if I am wrong).
which shows that
I'd be happy to change things but I am not sure what the reasoning behind this is, on my current knowledge it seems to me as if |
I guess I've misunderstood terminology related to this library. |
I am not entirely sure whether I undestand you correctly. Could you elaborate on your example? Do you think we need to improve something in the documentation? |
For example: On Windows "absolute path" = "full path". "/", "/dir", "/dir/tmp" are considered relative in shlwapi, C++17 filesystem, Qt etc because there is an "Apply the current directory" translation stage. From the link you've posted earlier:
Drive can be changed dynamically using SetCurrentDirectoryW or _chdir functions. char buffer[FILENAME_MAX]; will print \utilities instead of C:\utilities. Information is lost because it can be C,D,E or whatewer, which needs to be validated by other functions like GetFullPathNameW or by setting global state etc. |
Thanks @kampeador , I understand your issue. I will have to think about that and whether I can do something about it. |
Hello.
Thanks for your library and putting a lot of effort into it.
I've made this simple unit test and 5 asserts have failed.
Windows also has a PathIsRelativeA/W function, which can be used as reference. However it has some limitations e.g MAX_PATH limit.
The text was updated successfully, but these errors were encountered: