Changeset 3103 for trunk


Ignore:
Timestamp:
08/24/07 15:18:34 (13 years ago)
Author:
curtis
Message:

Fix up spreadsheet process launcher -- but still broken on Mac OS X.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/overlays/SpreadsheetLauncher.java

    r3070 r3103  
    9090  { 
    9191    if (file.exists()) { 
    92       String command = formatPath(appPath) + " " + 
    93         formatPath(file.getAbsolutePath()); 
    94  
     92      String cmd = appPath; 
     93      String filePath = file.getAbsolutePath(); 
     94      String[] command = {cmd, filePath}; 
    9595      try { 
    9696        Runtime.getRuntime().exec(command); 
    9797      } 
    9898      catch (IOException ex) { 
    99         throw new SpreadsheetLaunchException(makeCommandErrorMessage(command)); 
     99        throw new SpreadsheetLaunchException(makeCommandErrorMessage(cmd)); 
    100100      } 
    101101    } 
     
    106106 
    107107  // -- Helper methods -- 
    108  
    109   /** Formats path to avoid problems caused by embedded spaces. */ 
    110   protected String formatPath(String plainPath) { 
    111     String formattedPath = plainPath; 
    112     if (isWindows()) formattedPath = "\"" + formattedPath + "\""; 
    113     return formattedPath; 
    114   } 
    115108 
    116109  /** Whether the OS is windows. */ 
Note: See TracChangeset for help on using the changeset viewer.