Mailinglist Archive: zypp-commit (301 mails)

< Previous Next >
[zypp-commit] r7436 - /trunk/libzypp/zypp/RepoManager.cc
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Thu, 04 Oct 2007 10:38:45 -0000
  • Message-id: <20071004103845.560A12FCBD@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Thu Oct  4 12:38:44 2007
New Revision: 7436

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7436&view=rev
Log:
- repository files may contain a number in ext

Modified:
    trunk/libzypp/zypp/RepoManager.cc

Modified: trunk/libzypp/zypp/RepoManager.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.cc?rev=7436&r1=7435&r2=7436&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoManager.cc (original)
+++ trunk/libzypp/zypp/RepoManager.cc Thu Oct  4 12:38:44 2007
@@ -18,6 +18,7 @@
 #include "zypp/base/Logger.h"
 #include "zypp/base/Gettext.h"
 #include "zypp/base/Function.h"
+#include "zypp/base/Regex.h"
 #include "zypp/PathInfo.h"
 #include "zypp/TmpPath.h"
 
@@ -175,9 +176,10 @@
     if ( filesystem::readdir( entries, Pathname(dir), false ) != 0 )
       ZYPP_THROW(Exception("failed to read directory"));
 
+    str::regex allowedRepoExt("^\\.repo(_[0-9]+)?$");
     for ( list<Pathname>::const_iterator it = entries.begin(); it != entries.end(); ++it )
     {
-      if (it->extension() == ".repo")
+      if (str::regex_match(it->extension(), allowedRepoExt))
       {
         list<RepoInfo> tmp = repositories_in_file( *it );
         repos.insert( repos.end(), tmp.begin(), tmp.end() );

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages