[issue33428] pathlib.Path.glob does not follow symlinks
Brian Sheldon <brianmshel...@gmail.com> added the comment: Windows does not implement symlinks as junctions. Windows has hardlinks, symlinks and junctions which are all distinctly different in behaviour. I don't doubt that this is a Windows-specific issue, although I have not tested other platforms. Path.glob and .rglob does work for junctions and hardlinks but glob.glob works consistently for all three. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33428> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33428] pathlib.Path.glob does not follow symlinks
Change by Brian Sheldon <brianmshel...@gmail.com>: -- type: -> behavior ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33428> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33428] pathlib.Path.glob does not follow symlinks
New submission from Brian Sheldon <brianmshel...@gmail.com>: Given a `pathlib.Path` that contains symlinked subfolders, `Path.glob` (and `.rglob`) do not follow symlinks. This is not consistent with `glob.glob` which does. For example given the following: C:\Folder C:\Folder\Subfolder -> D:\Subfolder D:\Subfolder\File.txt `pathlib.Path('C:/Folder').glob('**/*')` yields the following paths: WindowsPath('C:/Folder/Subfolder') `glob.glob('C:/Folder/**/*')` yields the following paths: 'C:/Folder\\Subfolder' 'C:/Folder\\Subfolder\\File.txt' Notice how the contents of Subfolder are present in the `glob.glob` results but not for `Path.glob`. I would expect `Path.glob` to be consistent with `glob.glob`. This is not the only inconsistency (e.g. #22276, #31202) and perhaps `Path.glob` should be re-implemented using `glob.glob`. -- components: Library (Lib), Windows messages: 316197 nosy: brianmsheldon, emilyemorehouse, paul.moore, pitrou, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: pathlib.Path.glob does not follow symlinks versions: Python 3.6 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33428> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33392] pathlib .glob('*/') returns files as well as directories
Brian Sheldon <brianmshel...@gmail.com> added the comment: This appears to be a duplicate of #22276 -- nosy: +brianmsheldon ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33392> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com