Skip to content

Handling a case when file with a matching name is imported #1669

@Gozala

Description

@Gozala

Describe the bug

At the moment attempt importing a file into a directory that contains file with a same name will eventually throw an exception when imported file is copied to the destination & crash the program (as reported by @rafaelramalho19)

https://github.com/ipfs-shipyard/ipfs-webui/pull/1655/files

Expected behavior

We should figure out a way to handle name collisions, rather than swallowing an error or logging it into a console.

  1. We could check for name collisions prior we even start import.
  2. We could deal with name collisions as they occur, similar to how OSs do e.g. suffix with a number.

Screenshots
image

Metadata

Metadata

Assignees

Labels

effort/daysEstimated to take multiple days, but less than a weekexp/intermediatePrior experience is likely helpfulkind/bugA bug in existing code (including security flaws)need/triageNeeds initial labeling and prioritization

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions