Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
corpus2
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
corpus2
Commits
9568d4e4
Commit
9568d4e4
authored
13 years ago
by
ilor
Browse files
Options
Downloads
Patches
Plain Diff
pathsearcher update: handle absolute (complete) paths, allow symlinks etc
parent
46b6ba11
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libpwrutils/pathsearch.cpp
+12
-1
12 additions, 1 deletion
libpwrutils/pathsearch.cpp
with
12 additions
and
1 deletion
libpwrutils/pathsearch.cpp
+
12
−
1
View file @
9568d4e4
...
...
@@ -75,10 +75,21 @@ std::string PathSearcherBase::find_file(const std::string& filename,
const
std
::
string
&
info
)
{
boost
::
filesystem
::
path
i
(
filename
);
if
(
i
.
is_complete
())
{
if
(
boost
::
filesystem
::
exists
(
i
)
&&
!
boost
::
filesystem
::
is_directory
(
i
))
{
if
(
verbose_loading_
)
{
std
::
cerr
<<
"Found "
<<
info
<<
" file: "
<<
i
.
string
()
<<
"
\n
"
;
}
return
i
.
string
();
}
return
""
;
}
foreach
(
const
std
::
string
&
s
,
paths_
)
{
boost
::
filesystem
::
path
pi
=
s
/
i
;
if
(
boost
::
filesystem
::
exists
(
pi
)
&&
boost
::
filesystem
::
is_
regular
(
pi
))
{
!
boost
::
filesystem
::
is_
directory
(
pi
))
{
if
(
verbose_loading_
)
{
std
::
cerr
<<
"Found "
<<
info
<<
" file: "
<<
pi
.
string
()
<<
"
\n
"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment