Make noext, ext from the file basename instead of whole path.

master
voussoir 2019-12-12 12:15:57 -08:00
parent f40f41b62a
commit 514af31c18
1 changed files with 1 additions and 1 deletions

View File

@ -35,9 +35,9 @@ def brename(transformation, autoyes=False, recurse=False):
news = []
for (index, x) in enumerate(olds):
(noext, ext) = os.path.splitext(x)
directory = os.path.dirname(x)
basename = os.path.basename(x)
(noext, ext) = os.path.splitext(basename)
x = basename
x = eval(transformation)
x = os.path.join(directory, x)