Author: dmacvicar Date: Fri Aug 10 16:08:32 2007 New Revision: 6593 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6593&view=rev Log: fix MediaSetAccess unit tests Modified: trunk/libzypp/zypp/MediaSetAccess.cc Modified: trunk/libzypp/zypp/MediaSetAccess.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/MediaSetAccess.cc?rev=6593&r1=6592&r2=6593&view=diff ============================================================================== --- trunk/libzypp/zypp/MediaSetAccess.cc (original) +++ trunk/libzypp/zypp/MediaSetAccess.cc Fri Aug 10 16:08:32 2007 @@ -500,13 +500,13 @@ // code has to be adapted together with the MediaISO change. // maybe some MediaISOURL interface should be used. std::string isofile = url_r.getQueryParam("iso"); - str::regex e("^(.*(cd|dvd))([0-9]+)(\\.iso)$", str::regex::icase); + str::regex e("^(.*)(cd|dvd)[0-9]+\\.iso$", str::regex::icase); str::smatch what; if(str::regex_match(isofile, what, e)) { Url url( url_r); - isofile = what[1] + str::numstring(medianr) + what[4]; + isofile = what[1] + what[2] + str::numstring(medianr) + ".iso"; url.setQueryParam("iso", isofile); DBG << "Url rewrite result: " << url << endl; return url; @@ -515,12 +515,12 @@ else { std::string pathname = url_r.getPathName(); - str::regex e("^(.*(cd|dvd))([0-9]+)(/?)$", str::regex::icase); + str::regex e("^(.*)(cd|dvd)[0-9]+(/)?$", str::regex::icase); str::smatch what; if(str::regex_match(pathname, what, e)) { Url url( url_r); - pathname = what[1] + str::numstring(medianr) + what[4]; + pathname = what[1] + what[2] + str::numstring(medianr) + what[3]; url.setPathName(pathname); DBG << "Url rewrite result: " << url << endl; return url; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org