Skip to content

Commit

Permalink
Improve handling of traced symlinks
Browse files Browse the repository at this point in the history
In particular, don't make them input files.
  • Loading branch information
remram44 committed Sep 22, 2021
1 parent 0f9fd1d commit 7ebf00a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions reprozip/reprozip/tracer/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,12 @@ def get_files(conn):
# Adds symbolic links as read files
for filename in find_all_links(r_name.parent if r_mode & FILE_LINK
else r_name, False):
if filename not in files:
try:
f = files[filename]
except KeyError:
f = TracedFile(filename)
f.read(run)
files[f.path] = f
f.read(run)
# Go to final target
if not r_mode & FILE_LINK:
r_name = r_name.resolve()
Expand All @@ -185,7 +187,11 @@ def get_files(conn):
files[fp.path] = fp

# Identifies input files
if r_name.is_file() and r_name not in executed:
if (
not r_mode & FILE_LINK
and r_name.is_file()
and r_name not in executed
):
access_files[-1].add(f)
cur.close()

Expand Down

0 comments on commit 7ebf00a

Please sign in to comment.