Symlinks bug

Open
#65 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
tooling

Research direction

Start at the atomic_write entry point and trace how the destination path and temporary-file directory are selected for a symlink. The change is done when paths are resolved recursively before operations, so the temporary file and replacement target use the final non-symlink path described in the issue; no test file is named.

Written by the indexing model from the issue text.

Description

Suppose such case:

/mnt/readonly_fs/some_symlink -> /var/real_file.

So, atomic_write('/mnt/readonly_fs/some_symlink') will try to create temporary file in /mnt/readonly_fs/. This is BUG. It should create temporary file in /var and replace /var/real_file accordingly.

The library have to resolve path recursively to get final path without any symlinks. It must do it before any operations.

Dominant language
JavaScript
Stars
256
Forks
51
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from npm/write-file-atomic

All issues in npm/write-file-atomic

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.