From: <ha...@us...> - 2010-12-27 16:28:54
|
Revision: 14909 http://jmol.svn.sourceforge.net/jmol/?rev=14909&view=rev Author: hansonr Date: 2010-12-27 16:28:47 +0000 (Mon, 27 Dec 2010) Log Message: ----------- version=12.0.26_dev # bug fix: write xxx.jmol can fail if the same file is used twice in two different contexts Modified Paths: -------------- branches/v12_0/Jmol/src/org/jmol/viewer/FileManager.java branches/v12_0/Jmol/src/org/jmol/viewer/Jmol.properties Modified: branches/v12_0/Jmol/src/org/jmol/viewer/FileManager.java =================================================================== --- branches/v12_0/Jmol/src/org/jmol/viewer/FileManager.java 2010-12-27 11:23:39 UTC (rev 14908) +++ branches/v12_0/Jmol/src/org/jmol/viewer/FileManager.java 2010-12-27 16:28:47 UTC (rev 14909) @@ -1111,6 +1111,7 @@ long nBytes = 0; Logger.info("creating zip file " + outFileName + "..."); String fullFilePath = null; + String fileList = ""; try { ByteArrayOutputStream bos = (outFileName.startsWith("http://") ? new ByteArrayOutputStream() : null); ZipOutputStream os = new ZipOutputStream(bos == null ? @@ -1119,6 +1120,10 @@ String fname = (String) fileNamesAndByteArrays.get(i); if (fname.indexOf("file:/") == 0) fname = fname.substring(6); + String key = ";" + fname + ";"; + if (fileList.indexOf(key) >= 0) + continue; + fileList += key; byte[] bytes = (byte[]) fileNamesAndByteArrays.get(i + 1); String fnameShort = fname; if (!preservePath || fname.indexOf("|") >= 0) { Modified: branches/v12_0/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- branches/v12_0/Jmol/src/org/jmol/viewer/Jmol.properties 2010-12-27 11:23:39 UTC (rev 14908) +++ branches/v12_0/Jmol/src/org/jmol/viewer/Jmol.properties 2010-12-27 16:28:47 UTC (rev 14909) @@ -4,6 +4,7 @@ version=12.0.26_dev +# bug fix: write xxx.jmol can fail if the same file is used twice in two different contexts # bug fix: obj/pmesh file reading problems # bug fix: failure to create atomicOrbital does not clear that isosurface # bug fix: popup menu does not show load {1 1 1} options correctly This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |