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

Directory zipEntry got a empty name #466

Open
chocking opened this issue Nov 27, 2023 · 0 comments
Open

Directory zipEntry got a empty name #466

chocking opened this issue Nov 27, 2023 · 0 comments

Comments

@chocking
Copy link

https://github.com/cthackers/adm-zip/blob/master/zipEntry.js#L233C25-L233C25

get name() {
  var n = _entryName.toString();
  return _isDirectory
      ? n
            .substr(n.length - 1)
            .split("/")
            .pop()
      : n.split("/").pop();
},

Is it wrong usage of "substr"?For example, a directory zipEntry with raw name "a/b/c/", will got a empty name.

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