From 54b40767788416308ddf9254a217a8108c0a7dcd Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Thu, 17 Jul 2025 18:53:13 +0100 Subject: [PATCH] Detect templates that return a constant string in save to disk/send to device. --- src/calibre/gui2/preferences/save_template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/preferences/save_template.py b/src/calibre/gui2/preferences/save_template.py index 661a6c5a1f..1b523d9f18 100644 --- a/src/calibre/gui2/preferences/save_template.py +++ b/src/calibre/gui2/preferences/save_template.py @@ -91,7 +91,7 @@ class SaveTemplate(QWidget, Ui_Form): return True try: t = validation_formatter.validate(tmpl) - if not t: + if not t or t == tmpl: return question_dialog(self, _('Constant template'), _('The template contains no {fields}, so all ' 'books will have the same name. Is this OK?'))