Revision: 15800 http://gate.svn.sourceforge.net/gate/?rev=15800&view=rev Author: valyt Date: 2012-05-17 15:00:16 +0000 (Thu, 17 May 2012) Log Message: ----------- File 'extensions' should not include the leading '.'.
Modified Paths: -------------- gate/trunk/src/gate/DocumentFormat.java Modified: gate/trunk/src/gate/DocumentFormat.java =================================================================== --- gate/trunk/src/gate/DocumentFormat.java 2012-05-17 14:45:29 UTC (rev 15799) +++ gate/trunk/src/gate/DocumentFormat.java 2012-05-17 15:00:16 UTC (rev 15800) @@ -455,10 +455,12 @@ List<String> res = new LinkedList<String>(); if (url != null){ // get the file name from the URL - String fileName = url.getFile(); - int pos = fileName.indexOf('.', 1); + String fileName = url.getPath(); + int pos = fileName.lastIndexOf('/'); + if(pos > 0) fileName = fileName.substring(pos); + pos = fileName.indexOf('.', 1); while(pos > 0 && pos < fileName.length() - 1) { - res.add(fileName.substring(pos)); + res.add(fileName.substring(pos + 1)); pos = fileName.indexOf('.', pos + 1); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ GATE-cvs mailing list GATE-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gate-cvs