-
Notifications
You must be signed in to change notification settings - Fork 2
Description
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:
- Resolve parameter
- Check existence of file
- 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.