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

isDirectory() is not compatible with z/OS #71

Open
laijonathan opened this issue Jan 10, 2023 · 1 comment
Open

isDirectory() is not compatible with z/OS #71

laijonathan opened this issue Jan 10, 2023 · 1 comment

Comments

@laijonathan
Copy link

laijonathan commented Jan 10, 2023

    isDirectory() {
      return (this.mode & 61440) === 16384;
    }

On z/OS the isDirectory() function always returns false.
The inode masks S_IFMT and S_IFDIR (61440 and 16384) do not seem to be compatible since S_IFMT on z/OS is defined as 0xFF000000

External source: https://www.nntp.perl.org/group/perl.mvs/2014/11/msg1875.html

A potential fix I have tested is to use the constants from the fs module instead of a hardcoded value. eg: fsNode.constants.S_IFMT

@laijonathan laijonathan mentioned this issue Jan 10, 2023
@laijonathan
Copy link
Author

@joliss @stefanpenner

Hi, I've made a PR that fixes #72

It would be awesome if we could get it reviewed. Thanks!

@laijonathan laijonathan changed the title isDirectory() not compatible with z/OS isDirectory() is not compatible with z/OS Jan 25, 2023
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