[issue12970] os.wlak() consider some symlinks as dirs instead of non-dirs

2011-09-13 Thread Марк Коренберг
Марк Коренберг added the comment: Also, there is some mis-optimisation for followlinks=False: stat() and then lstat() will be called. Instead of one lstat(). Code may be rewritten as (but I don't know about cross-platform issues): - if followlinks: mode = os

[issue12970] os.wlak() consider some symlinks as dirs instead of non-dirs

2011-09-13 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue12970] os.wlak() consider some symlinks as dirs instead of non-dirs

2011-09-13 Thread Марк Коренберг
New submission from Марк Коренберг : Consider code: for (root, dirs, nondirs) in os.walk(path, followlinks=False): print (nondirs) This code will not print symlinks that refer to some dir. I think it is the bug. In other words: If followlinks is True, we should consider some symlinks as d