From: <pj...@us...> - 2008-07-28 23:13:23
|
Revision: 5016 http://jython.svn.sourceforge.net/jython/?rev=5016&view=rev Author: pjenvey Date: 2008-07-28 23:13:21 +0000 (Mon, 28 Jul 2008) Log Message: ----------- fix chdir('/') on windows Modified Paths: -------------- branches/asm/Lib/os.py Modified: branches/asm/Lib/os.py =================================================================== --- branches/asm/Lib/os.py 2008-07-28 22:56:55 UTC (rev 5015) +++ branches/asm/Lib/os.py 2008-07-28 23:13:21 UTC (rev 5016) @@ -243,11 +243,12 @@ Change the current working directory to the specified path. """ - if not _path.exists(path): + realpath = _path.realpath(path) + if not _path.exists(realpath): raise OSError(errno.ENOENT, errno.strerror(errno.ENOENT), path) - if not _path.isdir(path): + if not _path.isdir(realpath): raise OSError(errno.ENOTDIR, errno.strerror(errno.ENOTDIR), path) - sys.setCurrentWorkingDir(_path.realpath(path)) + sys.setCurrentWorkingDir(realpath) def listdir(path): """listdir(path) -> list_of_strings This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |