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:
parent
a5bfd69fa7
commit
f5b0bf8ffd
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue