File tree 1 file changed +4
-11
lines changed 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -63,15 +63,6 @@ bool rootIsPrefix(const std::string& root,
63
63
return true ;
64
64
}
65
65
66
- std::string prepareFilePathForTree (const std::string& path,
67
- const std::string& currentSourceDir)
68
- {
69
- if (!cmSystemTools::FileIsFullPath (path)) {
70
- return cmSystemTools::CollapseFullPath (currentSourceDir + " /" + path);
71
- }
72
- return cmSystemTools::CollapseFullPath (path);
73
- }
74
-
75
66
std::vector<std::string> prepareFilesPathsForTree (
76
67
const std::vector<std::string>& filesPaths,
77
68
const std::string& currentSourceDir)
@@ -80,9 +71,11 @@ std::vector<std::string> prepareFilesPathsForTree(
80
71
prepared.reserve (filesPaths.size ());
81
72
82
73
for (auto const & filePath : filesPaths) {
74
+ std::string fullPath =
75
+ cmSystemTools::CollapseFullPath (filePath, currentSourceDir);
83
76
// If provided file path is actually not a file, silently ignore it.
84
- if (cmSystemTools::FileExists (filePath , /* isFile=*/ true )) {
85
- prepared.push_back ( prepareFilePathForTree (filePath, currentSourceDir ));
77
+ if (cmSystemTools::FileExists (fullPath , /* isFile=*/ true )) {
78
+ prepared.emplace_back ( std::move (fullPath ));
86
79
}
87
80
}
88
81
You can’t perform that action at this time.
0 commit comments