From: <th...@us...> - 2009-04-05 17:22:43
|
Revision: 6164 http://jython.svn.sourceforge.net/jython/?rev=6164&view=rev Author: thobes Date: 2009-04-05 17:22:40 +0000 (Sun, 05 Apr 2009) Log Message: ----------- Fix for http://bugs.jython.org/issue1110 Modified Paths: -------------- trunk/jython/src/org/python/core/PySystemState.java Modified: trunk/jython/src/org/python/core/PySystemState.java =================================================================== --- trunk/jython/src/org/python/core/PySystemState.java 2009-04-05 03:18:39 UTC (rev 6163) +++ trunk/jython/src/org/python/core/PySystemState.java 2009-04-05 17:22:40 UTC (rev 6164) @@ -449,10 +449,16 @@ * @return a resolved path String */ public String getPath(String path) { - if (path == null || new File(path).isAbsolute()) { + if (path == null) { return path; + } else { + File file = new File(path); + if (!file.isAbsolute()) { + file = new File(getCurrentWorkingDir(), path); + } + // This needs to be performed always to trim trailing backslashes on Windows + return file.getPath(); } - return new File(getCurrentWorkingDir(), path).getPath(); } public void callExitFunc() throws PyIgnoreMethodTag { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |