diff --git a/scripts/changeprefix.py b/scripts/changeprefix.py index 51844c05..381a4568 100755 --- a/scripts/changeprefix.py +++ b/scripts/changeprefix.py @@ -107,7 +107,10 @@ def main(from_prefix, to_prefix, paths=[], *, elif no_renames: to_path = from_path else: - to_path, _ = changeprefix(from_prefix, to_prefix, from_path) + to_path = os.path.join( + os.path.dirname(from_path), + changeprefix(from_prefix, to_prefix, + os.path.basename(from_path))[0]) # rename contents changefile(from_prefix, to_prefix, from_path, to_path,