diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-06-24 07:16:08 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-06-24 07:16:08 +0300 |
commit | 2e4984c185ddcd2da789017cd147338846ff409a (patch) | |
tree | 0293831900c860600efbaa747ea886d9d1cbf5bd /win/packaging/ca/CustomAction.cpp | |
parent | 792b53e80806df893ee62c9a1c1bd117114c8c6d (diff) | |
parent | a6087e7dc1ef3561d8189c8db15e9591d0f9b520 (diff) | |
download | mariadb-git-2e4984c185ddcd2da789017cd147338846ff409a.tar.gz |
Merge tag 'mariadb-10.0.20' into 10.0-FusionIO10.0-FusionIO
Conflicts:
storage/innobase/os/os0file.cc
storage/xtradb/os/os0file.cc
storage/xtradb/srv/srv0start.cc
Diffstat (limited to 'win/packaging/ca/CustomAction.cpp')
-rw-r--r-- | win/packaging/ca/CustomAction.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/win/packaging/ca/CustomAction.cpp b/win/packaging/ca/CustomAction.cpp index 67a17c2cc19..17bfca1debb 100644 --- a/win/packaging/ca/CustomAction.cpp +++ b/win/packaging/ca/CustomAction.cpp @@ -104,48 +104,48 @@ static void EscapeCommandLine(const wchar_t *in, wchar_t *out, size_t buflen) } pos= 0; - for(int i = 0 ; ; i++)
- {
- size_t n_backslashes = 0;
- wchar_t c;
- while (in[i] == L'\\')
- {
- i++;
- n_backslashes++;
- }
-
- c= in[i];
- if (c == 0)
- {
- /*
- Escape all backslashes, but let the terminating double quotation mark
- that caller adds be interpreted as a metacharacter.
- */
- for(size_t j= 0; j < 2*n_backslashes;j++)
- {
- out[pos++]=L'\\';
- }
- break;
- }
- else if (c == L'"')
- {
- /*
- Escape all backslashes and the following double quotation mark.
- */
- for(size_t j= 0; j < 2*n_backslashes + 1; j++)
- {
- out[pos++]=L'\\';
- }
- out[pos++]= L'"';
- }
- else
- {
- /* Backslashes aren't special here. */
- for (size_t j=0; j < n_backslashes; j++)
- out[pos++] = L'\\';
-
- out[pos++]= c;
- }
+ for(int i = 0 ; ; i++) + { + size_t n_backslashes = 0; + wchar_t c; + while (in[i] == L'\\') + { + i++; + n_backslashes++; + } + + c= in[i]; + if (c == 0) + { + /* + Escape all backslashes, but let the terminating double quotation mark + that caller adds be interpreted as a metacharacter. + */ + for(size_t j= 0; j < 2*n_backslashes;j++) + { + out[pos++]=L'\\'; + } + break; + } + else if (c == L'"') + { + /* + Escape all backslashes and the following double quotation mark. + */ + for(size_t j= 0; j < 2*n_backslashes + 1; j++) + { + out[pos++]=L'\\'; + } + out[pos++]= L'"'; + } + else + { + /* Backslashes aren't special here. */ + for (size_t j=0; j < n_backslashes; j++) + out[pos++] = L'\\'; + + out[pos++]= c; + } } out[pos++]= 0; } |