Skip to content

Commit

Permalink
Workaround in uriToFilename for stupid omc bug
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@15635 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Mar 25, 2013
1 parent 48764ec commit e30f00f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Compiler/FrontEnd/ModelicaBuiltin.mo
Expand Up @@ -1866,7 +1866,6 @@ protected
String [:] matches,matches2;
String path, schema, str;
Boolean isUri,isMatch:=false,isModelicaUri,isFileUri,isFileUriAbsolute;
Integer i := 0;
algorithm
isUri := regexBool(uri, "^[A-Za-z]*://");
if isUri then
Expand All @@ -1893,8 +1892,7 @@ algorithm
end if;
else
/* It is the first part of the name (Modelica.XXX) - look among the loaded classes for the name Modelica and use that path */
for f in libraries[:,1] loop
i := i + 1;
for i in 1:sum(1 for lib in libraries) loop
if libraries[i,1] == matches2[2] then
filename := libraries[i,2];
isMatch := true;
Expand Down Expand Up @@ -1940,7 +1938,7 @@ end uriToFilename;
function getLoadedLibraries
output String [:,2] libraries;
external "builtin";
annotation(Documentation(info="<html>
annotation(__OpenModelica_Impure=true,Documentation(info="<html>
Returns a list of names of libraries and their path on the system, for example:
<pre>{{\"Modelica\",\"/usr/lib/omlibrary/Modelica 3.2.1\"},{\"ModelicaServices\",\"/usr/lib/omlibrary/ModelicaServices 3.2.1\"}}</pre>
</html>"));
Expand Down

0 comments on commit e30f00f

Please sign in to comment.