From: <pj...@us...> - 2008-08-03 18:14:55
|
Revision: 5069 http://jython.svn.sourceforge.net/jython/?rev=5069&view=rev Author: pjenvey Date: 2008-08-03 18:14:53 +0000 (Sun, 03 Aug 2008) Log Message: ----------- expand tabs Modified Paths: -------------- branches/asm/src/org/python/core/io/FileIO.java Modified: branches/asm/src/org/python/core/io/FileIO.java =================================================================== --- branches/asm/src/org/python/core/io/FileIO.java 2008-08-03 16:30:08 UTC (rev 5068) +++ branches/asm/src/org/python/core/io/FileIO.java 2008-08-03 18:14:53 UTC (rev 5069) @@ -59,10 +59,10 @@ File fullPath = new RelativeFile(name); String rafMode = "r" + (writable ? "w" : ""); try { - if (plus && mode.charAt(0) == 'r' && !fullPath.isFile()) { - writable = false; - throw new FileNotFoundException(""); - } + if (plus && mode.charAt(0) == 'r' && !fullPath.isFile()) { + writable = false; + throw new FileNotFoundException(""); + } file = new RandomAccessFile(fullPath, rafMode); fileChannel = file.getChannel(); } catch (FileNotFoundException fnfe) { @@ -70,7 +70,7 @@ throw Py.IOError(errno.EISDIR, "Is a directory"); } if ( (writable && !fullPath.canWrite()) || - fnfe.getMessage().endsWith("(Permission denied)")) { + fnfe.getMessage().endsWith("(Permission denied)")) { throw Py.IOError(errno.EACCES, "Permission denied: '" + name + "'"); } throw Py.IOError(errno.ENOENT, "No such file or directory: '" + name + "'"); @@ -163,13 +163,13 @@ try { fileChannel.truncate(0); } catch (IOException ioe) { - // On Solaris and Linux, ftruncate(3C) returns EINVAL - // if not a regular file whereas, e.g., - // open("/dev/null", "w") works fine. Because we have - // to simulate the "w" mode in Java, we suppress the - // exception. - if (ioe.getMessage().equals("Invalid argument")) - return; + // On Solaris and Linux, ftruncate(3C) returns EINVAL + // if not a regular file whereas, e.g., + // open("/dev/null", "w") works fine. Because we have + // to simulate the "w" mode in Java, we suppress the + // exception. + if (ioe.getMessage().equals("Invalid argument")) + return; throw Py.IOError(ioe); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |