Revision: 13847 http://gate.svn.sourceforge.net/gate/?rev=13847&view=rev Author: markagreenwood Date: 2011-05-21 15:01:48 +0000 (Sat, 21 May 2011)
Log Message: ----------- make sure exported applications end up in a file with a .zip extension no matter what the user enters Modified Paths: -------------- gate/trunk/src/gate/gui/NameBearerHandle.java Modified: gate/trunk/src/gate/gui/NameBearerHandle.java =================================================================== --- gate/trunk/src/gate/gui/NameBearerHandle.java 2011-05-21 09:42:35 UTC (rev 13846) +++ gate/trunk/src/gate/gui/NameBearerHandle.java 2011-05-21 15:01:48 UTC (rev 13847) @@ -1233,7 +1233,15 @@ fileChooser.setResource("application.zip." + target.getName()); if(fileChooser.showSaveDialog(largeView) == JFileChooser.APPROVE_OPTION) { - final File targetZipFile = fileChooser.getSelectedFile(); + + //ensure that the ZIP file we produce actually ends .zip + File checkFile = fileChooser.getSelectedFile(); + if (!checkFile.getName().toLowerCase().endsWith(".zip")) { + checkFile = new File(checkFile.getParent(), checkFile.getName()+".zip"); + } + + final File targetZipFile = checkFile; + Runnable runnable = new Runnable() { public void run() { try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ GATE-cvs mailing list GATE-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gate-cvs