Skip to content

Commit f0c193d

Browse files
committed
Backported CORE-6499: Regression: gstat with switch -t executed via services fails with "found unknown switch" error
1 parent c6fb53f commit f0c193d

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

src/jrd/svc.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2860,6 +2860,30 @@ bool Service::process_switches(ClumpletReader& spb, string& switches)
28602860
{
28612861
string s;
28622862
spb.getString(s);
2863+
2864+
bool inStr = false;
2865+
for (FB_SIZE_T i = 0; i < s.length(); ++i)
2866+
{
2867+
if (s[i] == SVC_TRMNTR)
2868+
{
2869+
s.erase(i, 1);
2870+
if (inStr)
2871+
{
2872+
if (i < s.length() && s[i] != SVC_TRMNTR)
2873+
{
2874+
inStr = false;
2875+
continue;
2876+
}
2877+
}
2878+
else
2879+
{
2880+
inStr = true;
2881+
continue;
2882+
}
2883+
}
2884+
++i;
2885+
}
2886+
28632887
switches += s;
28642888
switches += ' ';
28652889
}

0 commit comments

Comments
 (0)