Author: coolo Date: Fri Feb 8 10:13:21 2008 New Revision: 8565 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8565&view=rev Log: r8388 | jkupec | 2008-01-29 17:05:41 +0100 (Di, 29 Jan 2008) | 2 lines - handle \" and \ at the end of the quoted parameter value Modified: branches/tmp/ma/jump_sat/libzypp/zypp/media/CurlConfig.cc Modified: branches/tmp/ma/jump_sat/libzypp/zypp/media/CurlConfig.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/media/CurlConfig.cc?rev=8565&r1=8564&r2=8565&view=diff ============================================================================== --- branches/tmp/ma/jump_sat/libzypp/zypp/media/CurlConfig.cc (original) +++ branches/tmp/ma/jump_sat/libzypp/zypp/media/CurlConfig.cc Fri Feb 8 10:13:21 2008 @@ -108,13 +108,22 @@ { // remove the quotes string::size_type pos = value.rfind('\"'); + bool cut_last = + pos == value.size() - 1 && pos > 1 && value[pos-1] != '\\'; value = value.substr(1, - pos == value.size() - 1 ? value.size() - 2 : value.size() - 1); + cut_last ? value.size() - 2 : value.size() - 1); // replace special characters: pos = 0; while ((pos = value.find('\\', pos)) != string::npos) { + // just erase the backslash if it is found at the end + if (pos == value.size() - 1) + { + value = value.erase(pos, 1); + break; + } + switch(value[pos+1]) { case 't': -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org