Browse Source

glob() does not sort any more - adding sorted() function

python3
Volker Birk 4 years ago
parent
commit
f7e00e5fe7
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      backend.py

+ 3
- 3
backend.py View File

@ -725,14 +725,14 @@ def codegen(obj):
filemask = arg
if filemask[0] == '/' or filemask[0] == '.':
files = glob(filemask)
files = sorted(glob(filemask))
else:
files = []
for directory in includePath:
path = os.path.join(directory, filemask)
files.extend(glob(path))
files.extend(sorted(glob(path)))
if reverse:
if files and reverse:
files = files[-1::-1]
if not(files):


Loading…
Cancel
Save