Skip to content

Commit

Permalink
pwd_path filter: only apply to relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Jun 18, 2024
1 parent 65f8a84 commit 3754408
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kvirt/jinjafilters/jinjafilters.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ def count(string, char):


def pwd_path(path):
if path is not None and os.path.exists("/i_am_a_container") and os.path.exists('/workdir'):
if path is not None and not os.path.isabs(path) and os.path.exists("/i_am_a_container")\
and os.path.exists('/workdir'):
return f'/workdir/{path}'
else:
return path
Expand Down

0 comments on commit 3754408

Please sign in to comment.