Use regular str.split() to split template parts in disambiguation
os.path.split() only even splits into two components, which means that path templates that have more than two parts (e.g., `%A/%d - %y/%X`) will not get split properly for the purpose of added disambiguation parts to them. os.path.join() will still work fine to splice the split template back together as it takes an arbitrary number of arguments.
This commit is contained in:
@@ -242,7 +242,7 @@ class Program:
|
||||
|
||||
# when disambiguating, use catalogNumber then barcode
|
||||
if disambiguate:
|
||||
templateParts = list(os.path.split(template))
|
||||
templateParts = template.split(os.sep)
|
||||
# Find the section of the template with the release name
|
||||
for i, part in enumerate(templateParts):
|
||||
if "%d" in part:
|
||||
|
||||
Reference in New Issue
Block a user