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

[BUG] The temporary file name is longer than the target file name #63

Open
zkochan opened this issue Jun 3, 2020 · 0 comments
Open
Labels
Bug thing that needs fixing

Comments

@zkochan
Copy link

zkochan commented Jun 3, 2020

What / Why

This library creates a temp file by appending some hash to the target file name. This is bad because when the target file name is really long (but still inside the filesystem limit) the temp file name might get out of that limit and a ENAMETOOLONG error will happen

We started to have this issue in pnpm v5, where we have really long file names in the content-addressable storage.
Related issue: pnpm/pnpm#2605

How

Current Behavior

The temp file name is the <target file>.<hash>

Steps to Reproduce

Write a file that has a name 1 character shorter than the accepted limit.

Expected Behavior

The temp file name is short or at least not longer than the target file name.

References

pnpm/pnpm#2605

@darcyclarke darcyclarke added the Bug thing that needs fixing label Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing
Projects
None yet
Development

No branches or pull requests

2 participants