-
Notifications
You must be signed in to change notification settings - Fork 19
Description
I've noticed when using xy::Filesystem::getRelativePath() that the input has to be correctly formatted to get the expected results (unless my expectations are wrong... which I wouldn't rule out)
Say there's a file at /some/file/path/file.thing
, I'd expect the relative path to the be the same when given these three "root" paths:
/some/file/otherpath
/some/file/otherpath/
/some/file/otherpath/otherfile.thing
However 2 & 3 both return an extra directory higher (e.g. ../../path/file.thing
instead of ../path/file.thing
)
I could understand if 3 was left as it is, but I'd think 1 & 2 should return the same?
Slightly related to this - getFilePath() returns the directory path including the final /
, so depending on your thoughts on this issue I'd maybe request to change that too, so it can be used as such: getRelativePath(somePath, getFilePath(rootFile))