Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Caren Kresse
callgraph
Commits
a190d3bf
Commit
a190d3bf
authored
May 13, 2021
by
Carsten Emde
Browse files
Considered a second code location to apply the most recent fix
parent
83464f04
Changes
1
Hide whitespace changes
Inline
Side-by-side
generatecypher.py
View file @
a190d3bf
...
...
@@ -466,7 +466,10 @@ def main(argv):
# store the length of the top level directory, as everything
# will be relative to it and the graph should be free of
# hardcoded paths.
topdirlength
=
len
(
dirtoscan
)
if
dirtoscan
==
'/'
:
topdirlength
=
0
else
:
topdirlength
=
len
(
dirtoscan
)
dirwalker
=
os
.
walk
(
dirtoscan
)
...
...
@@ -488,10 +491,7 @@ def main(argv):
if
args
.
verbose
:
print
(
fullfilename
)
if
dirtoscan
==
'/'
:
relfullfilename
=
fullfilename
else
:
relfullfilename
=
fullfilename
[
topdirlength
:]
relfullfilename
=
fullfilename
[
topdirlength
:]
if
os
.
path
.
islink
(
fullfilename
):
# keep checking whether or not a symlink can be resolved
...
...
@@ -539,7 +539,10 @@ def main(argv):
break
else
:
# the target is an actual file
symlink_to_target
[
relfullfilename
]
=
targetfile
[
topdirlength
:]
if
dirtoscan
==
'/'
:
symlink_to_target
[
relfullfilename
]
=
targetfile
else
:
symlink_to_target
[
relfullfilename
]
=
targetfile
[
topdirlength
:]
break
if
not
os
.
path
.
basename
(
fullfilename
)
in
filename_to_full_path
:
filename_to_full_path
[
os
.
path
.
basename
(
fullfilename
)]
=
set
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment