[PBCKP-358] sort directories to not skip 'base/1' because of 'base/12699'

Looks like os.walk may yield dirs unsorted.
This way "check if directory already here as part of larger directory"
man mistakenly skip short 'base/1' as "part of" 'base/12699'
This commit is contained in:
Yura Sokolov
2022-11-25 07:58:08 +03:00
parent b7a183081e
commit 7eab6e3463
+1 -1
View File
@@ -1799,7 +1799,7 @@ class ProbackupTest(object):
)
for root, dirs, files in os.walk(pgdata, topdown=False, followlinks=True):
for directory in dirs:
for directory in sorted(dirs):
directory_path = os.path.join(root, directory)
directory_relpath = os.path.relpath(directory_path, pgdata)