hpc / hpc/mpifileutils

dcp: handle when destination exists of different type

Open
#411 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
200
Forks
85
Avg merge
3d 21h
Merged PRs (30d)
2

Description

dcp does not always correctly copying files into the destination if the destination exists but is a different type. AN EEXIST error is logged, but otherwise silently skipped.

For example:

dcp file dst
dcp dir dst // dst does not become a directory

We should either:

  1. Remove the destination before proceeding (or allow some options similar to dsync).
  2. Imitate the behavior of cp
  3. Propagate the error to the user.

Contributor guide

Open the contributing guide

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.

Research direction

Start by reproducing the documented dcp file dst and dcp dir dst cases, then inspect how dcp handles the logged EEXIST condition and compare the related dsync behavior with cp. Clarify which of the three proposed outcomes is wanted before changing the implementation; done means a destination of a different type is handled explicitly rather than silently skipped.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.