Changeset 9657
- Timestamp:
- 2005-04-13T10:21:50+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/file/FileAssociationManager.java
r8240 r9657 28 28 29 29 import java.io.*; 30 import java.util.regex.*; 30 31 import javax.swing.table.*; 31 32 import org.greenstone.gatherer.Configuration; … … 212 213 } 213 214 if(command != null) { 215 216 // Make the command into a string [] 217 commands = command.split(" "); 218 219 // Now substitute any occurrences of %1 with its filename 220 // Note this is done after the split on spaces to avoid 221 // any conflict with filenames with spaces in them. 222 214 223 // We have to fix filename under windows to escape the backslashes 215 224 filename = filename.replaceAll(ESCAPE, ESCAPED_ESCAPE); 216 // Replace %1 with the appropriate filename 217 command = command.replaceAll(FILENAME_ARG, filename); 218 219 // Make the command into a string [] in case the filename has spaces in it 220 commands = command.split(" "); 225 226 for (int i=0; i<commands.length; i++) { 227 // Replace %1 with the appropriate filename 228 commands[i] = commands[i].replaceAll(FILENAME_ARG, filename); 229 } 230 221 231 } 222 232
Note:
See TracChangeset
for help on using the changeset viewer.