Skip to content

Internal token strings not resolved #373

@HolQue

Description

@HolQue

Three ways to import a file:

"[import]" :  "./imports/AA/imported.AA.jsonp"
"[import]" :  "imports/AA/imported.AA.jsonp"
"[import]" :  "/imports/AA/imported.AA.jsonp"

The first one and the second one are fine. Result: DotDict({'AA': 1})

The syntax of the third one is not valid under Windows, and therefore causes an error:

File '/imports/AA/imported.AA.jsonp' is not existing!

Now the same again, but with dynamic paths:

"path_separator" : "\\",
"[import]" :  ".${path_separator}imports${path_separator}AA${path_separator}imported.AA.jsonp"
"[import]" :  "imports${path_separator}AA${path_separator}imported.AA.jsonp"
"[import]" :  "${path_separator}imports${path_separator}AA${path_separator}imported.AA.jsonp"

The first one and the second one are fine again. Result: DotDict({'path_separator': '\\', 'AA': 1})

The syntax of the third one is not valid under Windows again, but now the error is:

File '%path_separator%__ConvertParameterToString__imports%path_separator%__ConvertParameterToString__AA%path_separator%__ConvertParameterToString__imported.AA.jsonp' is not existing!

Here I have doubts. My understanding is a 'three step computation' of an input path:

  1. Resolve parameter
  2. Check existence of file
  3. Read the content of file

Detecting that a file does not exist, means that all parameters are resolved already. Therefore I expect the same
error message like in the first example:

File '/imports/AA/imported.AA.jsonp' is not existing!

Internal token strings like '__ConvertParameterToString__' are not expected in error messages.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions