Reverse paths before renaming, let children of renamed dirs go first.

This way, the parent directory is always after all of its children.
This commit is contained in:
voussoir 2020-02-01 16:40:14 -08:00
parent a5bfd69fa7
commit f5b0bf8ffd

View file

@ -57,6 +57,7 @@ def brename(transformation, autoyes=False, recurse=False):
print('Is this correct? y/n') print('Is this correct? y/n')
ok = input('>').lower() in ('y', 'yes', 'yeehaw') ok = input('>').lower() in ('y', 'yes', 'yeehaw')
pairs = reversed(pairs)
if ok: if ok:
loop(pairs, dry=False) loop(pairs, dry=False)