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 detecting file as directory on zOS issue #8051 #8052

Merged
merged 3 commits into from Nov 17, 2020
Merged

Fix detecting file as directory on zOS issue #8051 #8052

merged 3 commits into from Nov 17, 2020

Conversation

mahdi-hm
Copy link
Contributor

@mahdi-hm mahdi-hm commented Nov 16, 2020

sys/stat.h provides macros like S_ISDIR to test for a directory. The macro S_IFDIR should not be used in this way since it has different result on zOS(Always detecting file as directory as a consequence).

@google-cla google-cla bot added the cla: yes label Nov 16, 2020
@acozzette acozzette added kokoro:run c++ release notes: yes labels Nov 17, 2020
@acozzette
Copy link
Member

@acozzette acozzette commented Nov 17, 2020

@mahdi-hosseini-moghaddam Thank you for sending this fix, but I think the one problem is that Windows doesn't seem to support the S_ISDIR macro. Maybe you could put in an ifdef to keep the old if condition for Windows builds?

@mahdi-hm
Copy link
Contributor Author

@mahdi-hm mahdi-hm commented Nov 17, 2020

@mahdi-hosseini-moghaddam Thank you for sending this fix, but I think the one problem is that Windows doesn't seem to support the S_ISDIR macro. Maybe you could put in an ifdef to keep the old if condition for Windows builds?

I didn't know that, Thank you for your comment. I will update that.

@acozzette acozzette merged commit 7b352d3 into protocolbuffers:master Nov 17, 2020
53 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ cla: yes release notes: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants