link icon indicating copy to clipboard operation
link copied to clipboard

Link protests overwriting an existing item if the (sub-)nameclass is changed

Open abrudz opened this issue 1 year ago • 0 comments

Describe the bug Link protests overwriting an existing item if the (sub-)nameclass is changed compared to the existing value. This can e.g. happen if editing dfn, giving it the same name as an existing tradfn (i.e. this has nothing to do with the specific use of add in the repro below). Link ends up with an orphaned file.

To Reproduce

      ]create # C:\tmp\issue
Linked: # ←→ C:\tmp\issue
      ⎕FX'baz' 'baz'
      ]add baz
Added: #.baz
      baz←{baz}
      ]add baz
Link Warning: Cannot write baz to "C:/tmp/issue/baz.aplf" - that file defines baz
Link Warning: Writing baz to file "C:/tmp/issue/baz~2.aplf"
Added: #.baz

Expected behaviour Silently overwrite the existing item (at least if compatible, i.e. 3/4 and 2/9).

Desktop (please complete the following information):

  • OS: Windows
  • APL version: 20.0.49263 64-bit Unicode
  • ⎕SE.Link.Version: 4.0.17

abrudz avatar May 08 '24 11:05 abrudz