Dyalog / link

Source code for Link – the built-in component that enables the use of text files as the primary storage mechanism for APL source code
https://dyalog.github.io/link
MIT License
19 stars 11 forks source link

Failure to remove obsolete file when nameclass changes #551

Open abrudz opened 1 year ago

abrudz commented 1 year ago

Describe the bug When the nameclass of an item has changed outside the editor, the file extension changes, but Link fails to notice the presence of the old file.

To Reproduce

      ]link.create # /tmp/nc-change
Linked: # ←→ c:\tmp\nc-change [directory was created] 
      ⎕FX'foo' '∘∘∘'
      ]link.add foo
Added: #.foo
      ⎕EX'foo'
      foo←⍳3
      ]link.add foo
Added: #.foo
      ↑⊃⎕ninfo⍠1⊢'/tmp/nc-change/*'
/tmp/nc-change/foo.apla
/tmp/nc-change/foo.aplf

Expected behaviour It should remove the orphaned file.

Session transcript If applicable, copy your log in to help explain your problem.

Desktop (please complete the following information):