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

Symlink installs do not copy empty directories #568

Open
EzraBrooks opened this issue Dec 30, 2024 · 1 comment
Open

Symlink installs do not copy empty directories #568

EzraBrooks opened this issue Dec 30, 2024 · 1 comment

Comments

@EzraBrooks
Copy link

I've noticed that when using --symlink-install, empty directories don't end up getting created in the resulting installation folder. This is sort of an odd case, but in our application we have a system where users can add some files to a particular directory in a ROS package via our UI. If they create that ROS package from scratch and they don't put anything in that directory to start with (which is fairly reasonable), the symlink install (which is our recommended default for users) does not create that directory at build time.

@EzraBrooks
Copy link
Author

Seems somewhat likely that this is because creating the directory is not done until here:

# ensure that destination exists
get_filename_component(symlink_dir "${symlink}" PATH)
if(NOT EXISTS "${symlink_dir}")
file(MAKE_DIRECTORY "${symlink_dir}")
endif()

Which is within a for-each loop that is operating on files, thus would not trigger if the directory is empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant