From: SourceForge.net <no...@so...> - 2007-07-21 13:43:06
|
Patches item #1718450, was opened at 2007-05-14 03:26 Message generated for change (Settings changed) made by fwierzbicki You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312867&aid=1718450&group_id=12867 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Pekka Laukkanen (laukpe) >Assigned to: Frank Wierzbicki (fwierzbicki) Summary: Patch for os.path.islink bug 1717491 Initial Comment: Attached ---------------------------------------------------------------------- Comment By: Pekka Laukkanen (laukpe) Date: 2007-05-20 05:20 Message: Logged In: YES user_id=1379331 Originator: YES My bad. Should have a) written a test for this and b) tested it also on Windows. I had actually noticed that gatCanonicalPath and getAbsolutePath (used by realpath and abspath, respectively) behave differently in Windows so that one of them normalizes the path and the other doesn't. Of course I didn't remember that when writing the patch... Assuming that normpath is fixed this can simply be fixed by changing the return statement to following return _normpath(_abspath(path)) != _normpath(_realpath(path)) Leaving this open for 2.2 is totally ok too because this is such a small issue anyway. I'm also looking forward to those platform specific os.path modules. ---------------------------------------------------------------------- Comment By: Charles Groves (cgroves) Date: 2007-05-20 01:22 Message: Logged In: YES user_id=1174327 Originator: NO This doesn't quite work under windows. _abspath returns paths on my C: drive starting with a lowercase c whereas _realpath returns paths starting with an uppercase c. This means islink returns true for everything. We could try to special-case this for Windows, but it might just be better to wait for hsk's platform specific path modules patch on jython-2.3. ntpath.py returns false for everything for islink. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312867&aid=1718450&group_id=12867 |