From: Frank W. <fwi...@us...> - 2005-06-13 03:04:00
|
Update of /cvsroot/jython/jython/org/python/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22163/org/python/core Modified Files: PyFile.java Log Message: Applied the essence of Jonathan Ellis' patch for 621502 zipfile bug. Only fixes the lack of exception in the case of appending to a non-existing file. I was unable to reproduce the rest just as Jonathan found. Index: PyFile.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyFile.java,v retrieving revision 2.33 retrieving revision 2.34 diff -C2 -d -r2.33 -r2.34 *** PyFile.java 13 Jun 2005 01:58:14 -0000 2.33 --- PyFile.java 13 Jun 2005 03:03:51 -0000 2.34 *************** *** 1573,1576 **** --- 1573,1581 ---- try { java.io.File f = new java.io.File(name); + if (c1 == 'r') { + if (!f.exists()) { + throw new java.io.IOException("No such file or directory: " + name); + } + } if (c1 == 'w') { // Hack to truncate the file without deleting it: |