8000 [PBCKP-358] sort directories to not skip 'base/1' because of 'base/12… · postgrespro/pg_probackup@7eab6e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7eab6e3

Browse files
committed
[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'
1 parent b7a1830 commit 7eab6e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/helpers/ptrack_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@ def pgdata_content(self, pgdata, ignore_ptrack=True, exclude_dirs=None):
17991799
)
18001800

18011801
for root, dirs, files in os.walk(pgdata, topdown=False, followlinks=True):
1802-
for directory in dirs:
1802+
for directory in sorted(dirs):
18031803
directory_path = os.path.join(root, directory)
18041804
directory_relpath = os.path.relpath(directory_path, pgdata)
18051805

0 commit comments

Comments
 (0)
0