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

fix: fixed module detection and naming #64

Merged
merged 2 commits into from Oct 9, 2020

Conversation

ErikBjare
Copy link
Member

No description provided.

@ErikBjare ErikBjare merged commit 9a569fa into master Oct 9, 2020
Road to 1.0 automation moved this from In progress to Done Oct 9, 2020
@ErikBjare ErikBjare deleted the dev/fix-module-name-and-filtering branch October 9, 2020 10:07
if not _validate_module(filename):
continue
# NOTE: os.access(match, os.X_OK) seems to always return True on Windows
elif os.path.isfile(match) and os.access(match, os.X_OK):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right way to do it...

On windows an executable should simply be an file which ends with ".exe" while on Linux all files with executable permissions should be considered an executable.

.desktop files should not have executable permissions, .service files should not have executable permissions and neither should .manifest files on a system with proper permissions set. Having workarounds for those specific files is just asking for trouble when other files are added in the future on windows.

Copy link
Member Author

@ErikBjare ErikBjare Oct 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Should probably be changed to do as you say: only accept .exe files on Windows and on other systems only those with the executable bit set (although .so files do too, butthey'll be excluded by the aw-* filter).

However, .desktop files should have the executable bit set in some circumstances (although it doesn't in the zip): https://askubuntu.com/questions/419610/permission-of-a-desktop-file

I don't have time to implement & test such a change right now though, but feel free to submit a quick PR.

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

Successfully merging this pull request may close these issues.

None yet

2 participants