On 12/4/13, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote: > FindPaths() is static. Thanks. > Did/does that actually work? The comment says "See if our image is in > any of the system locations.", but the comparison is "strncmp(fName, > basePath.Path(), strlen(basePath.Path())) == 0" with basePath referring > to one of the *_DEVELOP_DIRECTORY directories. So that should work only, > if the image file lives in one of those. Or do I miss something? Looks like that was actually introduced by you in 38fa81bf8f0ccc37a615a9f5bd333f9b781322b3 when refactoring for the removal of common, it previously looked in the system/common/config folders directly, and then appended develop/debug/ accordingly if a match was found. Will fix. > BTW, the BPathFinder::FindPath() API is probably more suited to what is > desired here. It is intended to find a path in the same installation > location as a given file. > > BPath infoPath; > if (BPathFinder(fName).FindPath(B_FIND_PATH_DEVELOP_DIRECTORY, > BString("debug/") << debugFileName, > B_FIND_PATH_EXISTING_ONLY, infoPath) == B_OK) { > ... > } > > The convenient optional subpath parameter saves the work to compose the > final path manually afterward, and the B_FIND_PATH_EXISTING_ONLY flag > saves the check whether the file actually exists. Nice, that would indeed save some steps. Will look into it later tonight. Thanks for the review, Rene