aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-06 19:33:56 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-06 19:33:56 +0000
commitdb1fa98e58f805d659b63529aeb1ead09d7a8e23 (patch)
treeca726399b953c5431c2d4c470ec85a2e623bba8b
parente07d3b94f6c0eebc9839a2ce4a5d1c120c336d19 (diff)
downloadpaludis-db1fa98e58f805d659b63529aeb1ead09d7a8e23.tar.gz
paludis-db1fa98e58f805d659b63529aeb1ead09d7a8e23.tar.xz
Map sync = syncer:protocol:// to use syncer rather than protocol as the VC key, and strip the syncer: part from the passed URL
-rw-r--r--paludis/portage_repository.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/paludis/portage_repository.cc b/paludis/portage_repository.cc
index c685c7b..66d6f96 100644
--- a/paludis/portage_repository.cc
+++ b/paludis/portage_repository.cc
@@ -1193,12 +1193,12 @@ PortageRepository::do_sync() const
if (_imp->sync.empty())
return false;
- std::string::size_type p(_imp->sync.find("://"));
+ std::string::size_type p(_imp->sync.find("://")), q(_imp->sync.find(":"));
if (std::string::npos == p)
throw InternalError(PALUDIS_HERE, "todo: no protocol for sync"); /// \todo fixme
- SyncerMaker::get_instance()->find_maker(_imp->sync.substr(0, p))(
- _imp->location, _imp->sync)->sync();
+ SyncerMaker::get_instance()->find_maker(_imp->sync.substr(0, std::min(p, q)))(
+ _imp->location, _imp->sync.substr(q < p ? q + 1 : 0))->sync();
return true;
}