Changeset 667 in tmcsimulator for trunk/src/tmcsim/cadsimulator/Coordinator.java


Ignore:
Timestamp:
09/14/2022 04:38:20 PM (4 years ago)
Author:
jdalbey
Message:

Coordinator.java Fix defect in copyXMLfile() that was failing to get path on Windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tmcsim/cadsimulator/Coordinator.java

    r660 r667  
    596596    private void copyXMLfile(String selectedFile) 
    597597    { 
    598         int ptr = kSimClockFilename.lastIndexOf(System.getProperty("file.separator")); 
     598        int ptr = kSimClockFilename.lastIndexOf("/"); // Slash is in .properties file 
    599599        String foldername = kSimClockFilename.substring(0, ptr+1); 
    600600        try { 
     601            // Windows will create the appropriate path from the slashes in foldername. 
    601602            Path destination = Paths.get(foldername + kIncidentScriptFilename); 
    602603            Path source = Paths.get(selectedFile); 
Note: See TracChangeset for help on using the changeset viewer.