Skip to content

Conversation

@chrchr-github
Copy link
Collaborator

No description provided.

const std::string::size_type colon = ext.find(':');
if (colon != std::string::npos) {
const bool windowsPath = colon == 2 && ext.size() > 4 && ext[3] == '\\';
const bool windowsPath = colon == 2 && ext.size() > 3 && ext[2] == ':';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Some logic for this already exists in Path::isAbsolute() and maybe other places as well. We could put this in a helper function later on and share the code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think that would work, since we are already inside a larger string here. We only need to know if there is a second colon.

@firewave firewave merged commit 2c54f31 into danmar:main Dec 12, 2023
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