Skip to content

Commit

Permalink
[plugins] Apply --skip-files also to destination of symlinks
Browse files Browse the repository at this point in the history
Resolves: #3767

Signed-off-by: Pavel Moravec <[email protected]>
  • Loading branch information
pmoravec authored and TurboTurtle committed Sep 3, 2024
1 parent 498ce94 commit cc88008
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sos/report/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,11 @@ def _copy_symlink(self, srcpath):
# Absolute path to the link target. If SYSROOT != '/' this path
# is relative to the host root file system.
absdest = os.path.normpath(dest)
if self._is_skipped_path(absdest):
self._log_debug(f"skipping excluded path '{absdest}' as symlink "
f"destination from {srcpath}")
return

# adjust the target used inside the report to always be relative
if os.path.isabs(linkdest):
# Canonicalize the link target path to avoid additional levels
Expand Down

0 comments on commit cc88008

Please sign in to comment.