Skip to content

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

Open
@zkochan

Description

@zkochan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions