AL icon indicating copy to clipboard operation
AL copied to clipboard

ALDoc Exception if app name contains illegal folder chars

Open mjmatthiesen opened this issue 1 year ago • 1 comments

Please include the following with each issue:

1. Describe the bug Create an app, name it something that includes an illegal symbol for a folder, e.g. a colon :

2. To Reproduce Steps to reproduce the behavior:

  1. Create an app and add a colon to the name
{
  "name": "Example: The App",
}
  1. Run the init command of al doc
  2. Run the build command
  3. Error
Unhandled exception. System.IO.IOException: The directory name is invalid. : 'C:\Users\username\Desktop\Temp\DocGen\docs\reference\example:-the-app'
   at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor)
   at System.IO.Directory.CreateDirectory(String path)
   at Microsoft.Dynamics.Nav.Documentation.Build.SetApiOutputDir(String path) in X:\Prod\aldoc\Build\Build.cs:line 130
   at Microsoft.Dynamics.Nav.Documentation.Build.Initialize() in X:\Prod\aldoc\Build\Build.cs:line 113
   at Microsoft.Dynamics.Nav.Documentation.RunImpl`1.Run() in X:\Prod\aldoc\RunImpl.cs:line 75
   at Microsoft.Dynamics.Nav.Documentation.Program.<>c.<Main>b__0_2(BuildOptions opts) in X:\Prod\aldoc\Program.cs:line 27
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at Microsoft.Dynamics.Nav.Documentation.Program.Main(String[] args) in X:\Prod\aldoc\Program.cs:line 16

3. Expected behavior Strip invalid chars

4. Actual behavior Doesn't strip

5. Versions:

  • AL Language: v13.0.971907
  • Visual Studio Code: any
  • Business Central: any
  • List of Visual Studio Code extensions that you have installed: any

Final Checklist

Please remember to do the following:

  • [x ] Search the issue repository to ensure you are reporting a new issue

  • [ x] Reproduce the issue after disabling all extensions except the AL Language extension

  • [ x] Simplify your code around the issue to better isolate the problem

Internal work item: AB#534250

mjmatthiesen avatar Apr 19 '24 15:04 mjmatthiesen

Thank you for submitting the issue, we reproduced the issue on our end. Accepted.

sergiusignacius avatar May 07 '24 10:05 sergiusignacius

The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 25.0.21102.0 and VS Code Extension Version 14.0.1056409.

If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo

For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://freddysblog.com/2020/06/25/working-with-artifacts/

JesperSchulz avatar Jul 15 '24 12:07 JesperSchulz