Skip to content

Conversation

@mcarpenter
Copy link
Contributor

I see some pretty basic problems with Dir#glob. This pull requests fixes just one of them: globs on the root directory / fail since the logic to remove a trailing slash on the initial path made the root path the empty string "". Then #entries() failed. (This still doesn't fix multiple trailing slashes).

The other problems that I see are:

  • glob always recurses (so globbing from / is never really practical, except on very small machines)
  • failure to open any directory anywhere under the initial path throws an exception and the glob fails
  • POLS: the comment says this works like ::Dir.glob yet both the signature and the semantics differ.

Unfortunately to fix these problems (first, last) requires a backwards-incompatible change and a major version bump (respecting semver). (At least a change in signature is a clear signal to consumers). Would this project accept a PR for the above items at this stage in its life?

@mfazekas mfazekas merged commit e2fbec7 into net-ssh:master Dec 28, 2018
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.

2 participants