Changeset 7092


Ignore:
Timestamp:
2004-03-18T13:24:32+13:00 (20 years ago)
Author:
mdewsnip
Message:

Fixed opening files on Windows (%1 was not being replaced with filename correctly).

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/file/FileAssociationManager.java

    r6795 r7092  
    223223        }
    224224        if(command != null) {
    225         // Make the command into a string [] just in case the filename has spaces in it
    226         commands = command.split(" ");
    227        
    228         // We have to fix filename under windows to escape the backslashes.
     225        // We have to fix filename under windows to escape the backslashes
    229226        filename = filename.replaceAll(ESCAPE, ESCAPED_ESCAPE);
    230227        // Replace %1 with the appropriate filename
    231         for(int i=0; i<commands.length; i++) {
    232             if (commands[i].equals(FILENAME_ARG)) {
    233             commands[i] = filename;
    234             }
    235         }
    236         //command = command.replaceAll(FILENAME_ARG, filename);
     228        command = command.replaceAll(FILENAME_ARG, filename);
     229
     230        // Make the command into a string [] in case the filename has spaces in it
     231        commands = command.split(" ");
    237232        }
    238233       
  • trunk/gli/src/org/greenstone/gatherer/gui/PreviewCommandDialog.java

    r6748 r7092  
    4747import org.greenstone.gatherer.Dictionary;
    4848import org.greenstone.gatherer.Gatherer;
    49 import org.greenstone.gatherer.file.FileAssociationManager;
    5049import org.greenstone.gatherer.gui.GComboBox;
    5150import org.greenstone.gatherer.gui.GLIButton;
Note: See TracChangeset for help on using the changeset viewer.