Changeset 194 in tmcsimulator-scriptbuilder
- Timestamp:
- 01/20/2020 07:37:05 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/structures/SimulationScript.java
r182 r194 274 274 */ 275 275 private void createAudioDirectory(Path path){ 276 File f = new File(path.toString()+"/audio"); 276 String separator = System.getProperty("file.separator"); 277 File f = new File(path.toString()+separator+"audio"); 277 278 if(!f.exists()) 278 279 { … … 285 286 { 286 287 String name = ((Integer) i.number).toString(); 287 File incidentFolder = new File(path.toString()+ "/audio/"+name);288 File incidentFolder = new File(path.toString()+separator+"audio"+separator+name); 288 289 if(!incidentFolder.exists()) 289 290 { … … 306 307 String output = radioEvent.toScriptFile(); 307 308 //optimally, this line should use the ID, but to account for files being read in, it needs to be the radiofile name 308 File newAudioScript = new File(path.toString()+"/audio/"+name+"/"+radioEvent.radioFile.replaceAll(".mp3","")+".txt"); 309 File newAudioScript = new File( 310 path.toString()+ 311 separator+ 312 "Audio"+ 313 separator+ 314 name+ 315 separator+ 316 radioEvent.radioFile.replaceAll(".mp3","")+ 317 ".txt"); 309 318 310 319 try … … 317 326 }catch(Exception e) 318 327 { 319 System.err.println("there was a problem creating your text files"); 328 //to find the bug that triggers this Exception, we need to print out the lines that 329 System.err.println("there was a problem creating your text files for: " + radioEvent.radioFile + "\n" + e.getMessage()); 320 330 } 321 331
Note: See TracChangeset
for help on using the changeset viewer.
