Skip to content

Conversation

Squareys
Copy link
Contributor

@Squareys Squareys commented Apr 23, 2021

Hi @vincentdchan !

I found two places where absolute paths are checked by comparing the first char toPaths::PATH_DIV, which does not work for windows absolute paths (e.g. C:/windows or C:\\windows).

I use normalized paths already, but further it could be useful for others to convert \\ into / on windows.

Best,
Jonathan

PS: Do you know about std::filesystem? It might be a more platform independent way to implement these path utilities.

Signed-off-by: Squareys <squareys@googlemail.com>
@vincentdchan
Copy link
Owner

Great! Would you add some unit tests for the codes you committed in Path.h?

@vincentdchan
Copy link
Owner

@Squareys I have been used std::filesystem's path class once, it's path will call system's API in path concatenation. Calling system's API is slow, it hurts the performance in benchmark. I try to do concatenation only in memory, so I wrote my own Path.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants