From 0d1ae59e3eabb84d1eb59c9bfafd36d246befe4b Mon Sep 17 00:00:00 2001 From: Ben Olden-Cooligan Date: Sun, 8 Oct 2023 18:20:09 -0700 Subject: [PATCH] Fix auto save ui interactions #202 --- NAPS2.Lib/ImportExport/AutoSaver.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/NAPS2.Lib/ImportExport/AutoSaver.cs b/NAPS2.Lib/ImportExport/AutoSaver.cs index 1e11ef21ac..c48467ccd0 100644 --- a/NAPS2.Lib/ImportExport/AutoSaver.cs +++ b/NAPS2.Lib/ImportExport/AutoSaver.cs @@ -117,10 +117,13 @@ private async Task InternalSave(AutoSaveSettings settings, List { - subPath = placeholders.Substitute(newPath!, true, i); - } + if (_dialogHelper.PromptToSavePdfOrImage(subPath, out string? newPath)) + { + subPath = placeholders.Substitute(newPath!, true, i); + } + }); } // TODO: This placeholder handling is complex and wrong in some cases (e.g. FilePerScan with ext = "jpg") // TODO: Maybe have initial placeholders that replace date, then rely on the ops to increment the file num @@ -139,7 +142,7 @@ private async Task InternalSave(AutoSaveSettings settings, List _notify.PdfSaved(subPath)); } return (success, subPath); } @@ -153,7 +156,7 @@ private async Task InternalSave(AutoSaveSettings settings, List _notify.ImagesSaved(images.Count, op.FirstFileSaved)); } return (success, subPath); }