diff --git a/.fontfoldercleanup/font_folder_cleanup.py b/.fontfoldercleanup/font_folder_cleanup.py index 99126cf..64bc79b 100644 --- a/.fontfoldercleanup/font_folder_cleanup.py +++ b/.fontfoldercleanup/font_folder_cleanup.py @@ -266,8 +266,8 @@ def dont_use_dots_for_font_files(root_path=font_location): if file_path.endswith('.otf') or file_path.endswith('.ttf') or file_path.endswith('.ttc') or file_path.endswith('.pdf'): new_file_path = None for x in ['.', ' ', '-', '.-','--']: - if file_path.startswith(x): - new_file_path = file_path.lstrip(x) + if file.startswith(x): + new_file_path = os.path.join(root, file.lstrip(x)) os.rename(file_path, new_file_path) print(f"Renamed file: {file_path} -> {new_file_path}") new_file_path = None @@ -280,7 +280,7 @@ if __name__ == '__main__': lowercase_all_the_folders() remove_spaces_in_dir_names() lowercase_and_dash_file_names() - dont_use_dots_for_font_files() prepend_folder_name_to_font_dash() + dont_use_dots_for_font_files() remove_ds_store_files() remove_empty_folders()