fix error in addDependency for sub dependencies
This commit is contained in:
parent
1ba60166f1
commit
6f5cba0021
|
@ -246,12 +246,13 @@ void collectSubDependencies()
|
|||
continue;
|
||||
// trim useless info, keep only library name
|
||||
std::string dep_path = lines[n].substr(1, lines[n].rfind(" (") - 1);
|
||||
std::string full_path = dep_path;
|
||||
if (isRpath(dep_path)) {
|
||||
dep_path = searchFilenameInRpaths(dep_path);
|
||||
collectRpathsForFilename(dep_path);
|
||||
full_path = searchFilenameInRpaths(dep_path);
|
||||
collectRpathsForFilename(full_path);
|
||||
}
|
||||
|
||||
addDependency(dep_path, dep_path);
|
||||
addDependency(dep_path, full_path);
|
||||
}
|
||||
}
|
||||
// if no more dependencies were added on this iteration, stop searching
|
||||
|
|
|
@ -38,7 +38,7 @@ bool fileExists(std::string filename)
|
|||
}
|
||||
else {
|
||||
std::string delims = " \f\n\r\t\v";
|
||||
std::string rtrimmed = filename.substr(0, filename.find_last_not_of(delims) + 1);
|
||||
std::string rtrimmed = filename.substr(0, filename.find_last_not_of(delims)+1);
|
||||
std::string ftrimmed = rtrimmed.substr(rtrimmed.find_first_not_of(delims));
|
||||
if (access(ftrimmed.c_str(), F_OK) != -1)
|
||||
return true;
|
||||
|
@ -137,13 +137,11 @@ std::string getUserInputDirForFile(const std::string& filename)
|
|||
|
||||
while (true) {
|
||||
std::cout << "\nPlease specify the directory where this library is located (or enter 'quit' to abort): ";
|
||||
// fflush(stdout);
|
||||
fflush(stdout);
|
||||
|
||||
std::string prefix;
|
||||
std::cin >> prefix;
|
||||
// std::cout << std::endl;
|
||||
|
||||
// getline(std::cin, prefix);
|
||||
std::cout << std::endl;
|
||||
|
||||
if (prefix.compare("quit") == 0)
|
||||
exit(1);
|
||||
|
|
Loading…
Reference in New Issue