atom/tree-view

Duplicating a file can wipe the original

mattmcdonald-uk opened this issue · 3 comments

Prerequisites

Description

Duplicating a file in Tree View can cause the original file to be wiped if you just change the case of the file name.

Steps to Reproduce

  1. Right click a file in Tree View and select 'Duplicate'.
  2. Change the case of a character in the filename (e.g. change Foo.txt to FOo.txt)

Expected behavior:

The original and duplicated file to exist, both with the original content.

Actual behavior:

The duplicated file is not created, and the original is wiped.

Reproduces how often:

100%

Versions

1.45.0

Additional Information

Occuring on macOS 10.15.4

In the majority of cases, macOS has case-insensitive file systems (or file systems that are functionally so). So we shouldn't be allowing you to name a file that differs only by case. We won't be able to deliver you the expected behavior, but we should show an error instead of wiping the original.

looks like atom/tree-view tries to handle this but something there isn't working on macOS.

Fixed in #1359