New submission from Xavier de Gaye:
On archlinux during an upgrade, the package manager backups some files in /etc
with a .pacnew extension. On my system there are 20 such files, 9 .pacnew files
located in /etc and 11 .pacnew files in subdirectories of /etc. The following
commands are run from /etc:
$ shopt -s globstar
$ ls **/*.pacnew | wc -w
20
$ ls *.pacnew | wc -w
9
With python:
$ python
Python 3.6.0a0 (default:72cca30f4707, Nov 2 2015, 14:17:31)
[GCC 5.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import glob
>>> len(glob.glob('./**/*.pacnew', recursive=True))
20
>>> len(glob.glob('*.pacnew'))
9
>>> len(glob.glob('**/*.pacnew', recursive=True))
11
The '**/*.pacnew' pattern does not list the files in /etc, only those located
in the subdirectories of /etc.
----------
components: Library (Lib)
messages: 254344
nosy: serhiy.storchaka, xdegaye
priority: normal
severity: normal
status: open
title: a recursive glob pattern fails to list files in the current directory
type: behavior
versions: Python 3.6
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25584>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com