From a19223d381be9e6b9836a146235ca25d79902c39 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Thu, 17 Oct 2013 20:08:55 +0000 Subject: [PATCH] Passing filenames per command line: Remove found match from input string after having found a quoted filename, so the second call to GetFileNames does not find some incomplete filename due to whitespaces in its name. See http://www.heidisql.com/forum.php?t=13743 --- source/helpers.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/helpers.pas b/source/helpers.pas index 3e5ebc00..dc59ee1f 100644 --- a/source/helpers.pas +++ b/source/helpers.pas @@ -2610,6 +2610,9 @@ var FileNames.Add(rx.Match[1]) else AbsentFiles.Add(rx.Match[1]); + // Remove match from input string, so the second call to GetFileNames without quotes + // does not detect filenames cut at whitespace + Delete(CommandLine, rx.MatchPos[1], rx.MatchLen[1]); if not rx.ExecNext then break; end;