Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix identified. Missing "/" on path concatenation. #77

Open
WallyZambotti opened this issue Mar 4, 2022 · 3 comments
Open

Fix identified. Missing "/" on path concatenation. #77

WallyZambotti opened this issue Mar 4, 2022 · 3 comments

Comments

@WallyZambotti
Copy link

In Dependency.cpp at around line 130:

    //check if file is contained in one of the paths
    for( int i=0; i<searchPathAmount; ++i)
    {
        std::string search_path = Settings::searchPath(i);
        if (search_path[ search_path.size()-1 ] != '/') search_path += "/";  // Add this line to fix missing "/" from path in next line
        if (fileExists( search_path+filename ))
        {
            std::cout << "FOUND " << filename << " in " << search_path << std::endl;
            prefix = search_path;
            missing_prefixes = true; //the prefix was missing
            break;
        }
    }
@SCG82
Copy link
Collaborator

SCG82 commented Mar 5, 2022

How did you end up with search_path without a trailing slash? If I'm not mistaken, every path added to Settings::searchPath is checked for a missing trailing slash prior to the Settings::addSearchPath(path) call.

@WallyZambotti
Copy link
Author

I stepped through the code and noticed there was no trailing "/" slash. So I added the fix and everything started working!!!

"/usr/local/lib"

Definitely no trailing slash when viewed in xCode debugger.

@SCG82
Copy link
Collaborator

SCG82 commented Mar 8, 2022 via email

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

No branches or pull requests

2 participants