Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ros2launch] Follow symlinks when walking. #345

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ros2launch/ros2launch/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def get_share_file_path_from_package(*, package_name, file_name):
"""
package_share_directory = get_package_share_directory(package_name)
matching_file_paths = []
for root, dirs, files in os.walk(package_share_directory):
for root, dirs, files in os.walk(package_share_directory, followlinks=True):
for name in files:
if name == file_name:
matching_file_paths.append(os.path.join(root, name))
Expand All @@ -68,7 +68,7 @@ def get_share_file_path_from_package(*, package_name, file_name):
def get_launch_file_paths(*, path):
"""Return a list of paths to launch files within a given path."""
launch_file_paths = []
for root, dirs, files in os.walk(path):
for root, dirs, files in os.walk(path, followlinks=True):
for file_name in files:
file_path = os.path.join(root, file_name)
if is_launch_file(path=file_path):
Expand Down