mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
de114b91f0
commit
ec9e8e1c58
@ -333,6 +333,7 @@ class Container(ContainerBase): # {{{
|
|||||||
return name in all_names
|
return name in all_names
|
||||||
|
|
||||||
def make_name_unique(self, name):
|
def make_name_unique(self, name):
|
||||||
|
''' Ensure that `name` does not already exist in this book. If it does, return a modified version that does not exist. '''
|
||||||
counter = count()
|
counter = count()
|
||||||
while self.has_name_case_insensitive(name) or self.manifest_has_name(name):
|
while self.has_name_case_insensitive(name) or self.manifest_has_name(name):
|
||||||
c = next(counter) + 1
|
c = next(counter) + 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user