Changeset 1568


Ignore:
Timestamp:
07/10/12 01:51:13 (12 years ago)
Author:
adeas31
Message:
  • Use Java's standard way to get temp directory for different platforms.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/org.modelica.mdt.omc/src/org/modelica/mdt/omc/OMCProxy.java

    r1537 r1568  
    214214    {
    215215        String fileName = null;
    216 
     216        String temp = System.getProperty("java.io.tmpdir");
    217217        /* This mirrors the way OMC creates the object file. */     
    218218        switch (os)
     
    225225            }
    226226            if (corbaSession == null || corbaSession.equalsIgnoreCase(""))
    227                 fileName = "/tmp/openmodelica." + username + ".objid";
     227                fileName = temp + "/openmodelica." + username + ".objid";
    228228            else
    229                 fileName = "/tmp/openmodelica." + username + ".objid" + "." +  corbaSession;
     229                fileName = temp + "/openmodelica." + username + ".objid" + "." +  corbaSession;
    230230            break;
    231         case WINDOWS:
    232             String temp = System.getenv("TMP");         
     231        case WINDOWS:   
    233232            if (corbaSession == null || corbaSession.equalsIgnoreCase(""))
    234233                fileName = temp + "\\openmodelica.objid";
Note: See TracChangeset for help on using the changeset viewer.