Describe the bug
External library loading feature takes a quoted string where special characters can be escaped.
Windows paths use backslashes \ which need to be escaped with \\ and it works most of the time, except when it clashes with other escaped characters.
For example folder\\table is interpreted as folder\ able, i.e. the backslash is applied on t and results in a tab character and not folder\table.
It's probably an issue in UTAP.
To Reproduce
Steps to reproduce the behavior:
- Download a
libtable-dbg.dll library from uppaal-libs and put it in C:\.
- Create a sample CSV file in
c:\table.csv
- In Uppaal declare the following:
import "C:\libtable-dbg.dll" { // strange, but works
/** read the table from the csv file and return its id: */
int table_read_csv(const string& filename, int skip_lines);
};
const int TID_GOOD = table_read_csv("C:/table.csv",1); // works
const int TID_BAD = table_read_csv("C:\\table.csv",1); // file not found, table is empty
- In
errors.log (in current directory from where Uppaal was launched) observe errors
Expected behavior
The parser should interpret \\t as \t and not as \ .
Version(s) of UPPAAL tested
Uppaal 5 rc4
Desktop (please complete the following information):
Additional context
The library path parsing should also be revisited.
Describe the bug
External library loading feature takes a quoted string where special characters can be escaped.
Windows paths use backslashes
\which need to be escaped with\\and it works most of the time, except when it clashes with other escaped characters.For example
folder\\tableis interpreted asfolder\ able, i.e. the backslash is applied ontand results in atabcharacter and notfolder\table.It's probably an issue in UTAP.
To Reproduce
Steps to reproduce the behavior:
libtable-dbg.dlllibrary from uppaal-libs and put it inC:\.c:\table.csverrors.log(in current directory from where Uppaal was launched) observe errorsExpected behavior
The parser should interpret
\\tas\tand not as\.Version(s) of UPPAAL tested
Uppaal 5 rc4
Desktop (please complete the following information):
Additional context
The library path parsing should also be revisited.