Fix index being added to single resources
This commit is contained in:
@@ -68,6 +68,9 @@ class FileNameFormatter:
|
||||
def format_resource_paths(self, resources: list[Resource],
|
||||
destination_directory: Path) -> list[tuple[Path, Resource]]:
|
||||
out = []
|
||||
if len(resources) == 1:
|
||||
out.append((self.format_path(resources[0], destination_directory, None), resources[0]))
|
||||
else:
|
||||
for i, res in enumerate(resources, start=1):
|
||||
logger.log(9, f'Formatting filename with index {i}')
|
||||
out.append((self.format_path(res, destination_directory, i), res))
|
||||
|
||||
Reference in New Issue
Block a user