waldo1001 / crs-al-language-extension

Make working with the (Dynamics NAV / 365) AL Language easier and more efficient.
MIT License
34 stars 42 forks source link

Rename File - File already exists #265

Open ChristianHovenbitzer opened 1 year ago

ChristianHovenbitzer commented 1 year ago

Hi, I'm having an issue with the function to rename files both with the action and the setting "CRS.OnSaveAlFileAction": "Rename".

The extension trys to rename the file but fails with an error stating the file already exists. I managed to reproduce this behaviour:

  1. create a new codeunit codeunit 50000 "Test" { }
  2. rename the file with "CRS: Rename - Current File"
  3. change a letter vom upper to lower case in the file name Cod50000.Test.al -> Cod50000.test.al
  4. make a change in the table name codeunit 50000 "Test" > codeunit 50000 "TesT"
  5. from now on each rename will result in this error message until the codeunit name is reverted to "Test"

image

JavierFuentes commented 1 year ago

Any news for this problem?

We are receiving the same error message with each Report generated with Txt2Al once we copy it to the folder of our AL project, which is based on Microsoft's AL-Go-PTE Template.

The project compiles without warnings or errors, but every time we make a change in the .Report.al file and save the changes, that error message is displayed and it is automatically closed.

Is there any way of clear cachés or something that solve this "rename" problem?

dirkmass commented 6 months ago

Commited. Could it be caused by case sensitivity? E.g. here is a codeunit called 'Sales Functions' and the file has ne name 'Salesfunctions.Codeunit.al' (with lowercase f).

vidarmagnusson commented 5 months ago

@dirkmass Your suggestion worked for me, many thanks :)