juce::URL::getSubPath() host/subpath bug

on JUCE 6.0.7 and using getSubPath of juce::URL to perform some URL parsing.

Given a url: file://partA/partB, getSubPath() returns partB which is reasonable since partA would be interpreted as the host. However, if we correct the URL to omit the host part file:///partA/partB, getSubPath() still only returns partB.

The code seems to simply consume all / after the scheme, then take a host, and then consider the rest the sub path, which is broken.

How shall we get this filed and fixed? Thanks

Perhaps File::getLocalFile() is what you are looking for instead?

1 Like

well file: is just an example. It happens with any scheme