Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-6238

WorkspaceAPI doesn't open correctly a file in WINDOWS envs.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 1.13.0.Final
    • Authoring Tooling
    • None
    • False
    • False

    Description

      This issue reproduces in Windows only.

      Steps to reproduce:

      • Open a DMN file
      • Go into the Included Model tab
      • Add any  other DMN file as Included Model (you need to have at least 2 dmn files in your project)
      • In the card, try to click on the imported file reference
      • The DMN editor tries to open a file in the wrong directory - it remains in an infinite loop

      The issue root cause is here

      https://github.com/kiegroup/kogito-tooling/blob/main/packages/vscode-extension/src/KogitoEditorChannelApiImpl.ts#L54

      and in particular this statement:

      __path.dirname(this.editor.document.uri.fsPath)

      returns "." as dir in Windows, while works correctly in UNIX based systems

      Debug example (WIN):

      path = "Traffic Violation.dmn"

      isAbsolute(path) = false

      dirName = "."

      joinedPath =  "Traffic Violation.dmn"

      Debug example (Linux):

      path = "Traffic Violation.dmn"

      isAbsolute(path) = false

      dirName = "/home/yamer/IdeaProjects/kogito-examples/dmn-quarkus-example/src/main/resources"

      joinedPath =  "/home/yamer/IdeaProjects/kogito-examples/dmn-quarkus-example/src/main/resources/Traffic Violation.dmn"

       

       

       

       

       

       

      Attachments

        Activity

          People

            yamer@redhat.com Yeser Amer
            yamer@redhat.com Yeser Amer
            Jozef Marko Jozef Marko
            Jozef Marko Jozef Marko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: