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

Fixed executable determination #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leonboot
Copy link

@leonboot leonboot commented Aug 3, 2021

I noticed that when copying files from the recipe that have the executable bit set, this bit was lost after copying. The cause was that the filename used for determining whether the executable flag was set was a concatenation of the recipe path and the relative filename. However, there was no directory separator, so the path to the file was always invalid and thus the executable flag was always set to false.

I changed the code to use the absolute path to the file instead of a concatenation of the recipe path and the relative path to the file.

Executable bit is always false due to missing directory separator between recipe path and relative filename
@leonboot
Copy link
Author

leonboot commented Aug 3, 2021

Another option would be to add a DIRECTORY_SEPARATOR between the recipe path and the relative file path, but I chose to use SplFileInfo->getPathname() method to get the absolute path to the file.

@leonboot
Copy link
Author

@moay did you get around to look at this PR yet? I believe it fixes a bug which prevents authors of recipes from adding executable scripts to the bin/ directory, since the executable bit on these scripts is lost.

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

Successfully merging this pull request may close these issues.

None yet

1 participant