'Save the book. Saving is performed in the background'

def save_book(self):

    c = current_container()
    for (name, ed) in editors.iteritems():
        if (ed.is_modified or (not ed.is_synced_to_container)):
            self.commit_editor_to_container(name, c)
            ed.is_modified = False
    path_to_ebook = os.path.abspath(c.path_to_ebook)
    destdir = os.path.dirname(path_to_ebook)
    if ((not c.is_dir) and (not os.path.exists(destdir))):
        info_dialog(self.gui, _(u'Path    does    not    exist'), (_(u'The    file    you    are    editing    (%s)    no    longer    exists.    You    have    to    choose    a    new    save    location.') % path_to_ebook), show_copy_button=False, show=True)
        fmt = path_to_ebook.rpartition(u'.')[(-1)].lower()
        start_dir = find_first_existing_ancestor(path_to_ebook)
        path = choose_save_file(self.gui, u'choose-new-save-location', _(u'Choose    file    location'), initial_path=os.path.join(start_dir, os.path.basename(path_to_ebook)), filters=[(fmt.upper(), (fmt,))], all_files=False)
        if (path is not None):
            if (not path.lower().endswith((u'.' + fmt))):
                path = ((path + u'.') + fmt)
            path = os.path.abspath(path)
            c.path_to_ebook = path
            self.global_undo.update_path_to_ebook(path)
        else:
            return
    self.gui.action_save.setEnabled(False)
    tdir = self.mkdtemp(prefix=u'save-')
    container = clone_container(c, tdir)
    self.save_manager.schedule(tdir, container)
