Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 5c5d5ad

Browse files
adeas31OpenModelica-Hudson
authored andcommitted
Check if .mol contains .mo files
If it does then load them normally Belonging to [master]: - #2939
1 parent 61b21df commit 5c5d5ad

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Compiler/Script/CevalScript.mo

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,10 +1445,18 @@ algorithm
14451445
b = true;
14461446
s1 = System.basename(filename);
14471447
s2 = Util.removeLast4Char(s1);
1448+
// possible .moc files to look for
14481449
filename1 = workdir + "/" + s2 + "/" + s2 + ".moc";
14491450
filename2 = workdir + "/" + s2 + "/package.moc";
14501451
filename_1 = if System.regularFileExists(filename1) then filename1 else filename2;
1452+
// possible .mo files to look for
1453+
str1 = workdir + "/" + s2 + "/" + s2 + ".mo";
1454+
str2 = workdir + "/" + s2 + "/package.mo";
1455+
str = if System.regularFileExists(str1) then str1 else str2;
1456+
// check if .mol contains .moc or .mo files
1457+
filename_1 = if System.regularFileExists(filename_1) then filename_1 else str;
14511458
if (System.regularFileExists(filename_1)) then
1459+
execStatReset();
14521460
filename_1 = Util.testsuiteFriendlyPath(filename_1);
14531461
p = SymbolTable.getAbsyn();
14541462
newp = loadFile(filename_1, "UTF-8", p, true);

0 commit comments

Comments
 (0)