Let easy_add_file return the created id.

This commit is contained in:
Ethan Dalool 2020-08-26 18:11:55 -07:00
parent b561a3233f
commit 37e1cd8ce2

View file

@ -608,7 +608,7 @@ class Epub:
''' '''
filepath = pathclass.Path(filepath) filepath = pathclass.Path(filepath)
with self._fopen(filepath.absolute_path, 'rb') as handle: with self._fopen(filepath.absolute_path, 'rb') as handle:
self.add_file( return self.add_file(
id=filepath.basename, id=filepath.basename,
basename=filepath.basename, basename=filepath.basename,
content=handle.read(), content=handle.read(),