Changeset 1431 for trunk


Ignore:
Timestamp:
03/23/12 15:22:04 (13 years ago)
Author:
wschamai
Message:

BUG FIX: omc temp folder access

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modelicaml/org.openmodelica.modelicaml.simulation/src/org/openmodelica/modelicaml/simulation/omc/OpenModelicaCompilerCommunication.java

    r999 r1431  
    122122    }
    123123   
     124   
     125    public String getTempDirectoryPath() {
     126        String path = executeCommand("getTempDirectoryPath()").replaceAll("\\\\\\\\\\\\\\\\",  "/").trim();     // replace \\\\ by / and trim
     127        // remove the first and the last double quote
     128        String pathCorrected = path.substring(1, path.length() - 1);
     129       
     130        if (pathCorrected.endsWith("/")) {
     131            return pathCorrected + "OpenModelica"; 
     132        }
     133        return pathCorrected + "/" + "OpenModelica";
     134    }
     135   
    124136    /**
    125137     * Clear everything.
Note: See TracChangeset for help on using the changeset viewer.