Author: aschnell Date: Thu Aug 9 12:53:31 2007 New Revision: 6542 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6542&view=rev Log: - check if name of input file is empty Modified: trunk/libzypp/zypp/parser/susetags/RepoParser.cc Modified: trunk/libzypp/zypp/parser/susetags/RepoParser.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/susetags/RepoParser.cc?rev=6542&r1=6541&r2=6542&view=diff ============================================================================== --- trunk/libzypp/zypp/parser/susetags/RepoParser.cc (original) +++ trunk/libzypp/zypp/parser/susetags/RepoParser.cc Thu Aug 9 12:53:31 2007 @@ -469,13 +469,16 @@ //if ( 0 ) // remove the if to enable, but leave the {} around. { Pathname inputfile( getOptionalFile( _descrdir / "packages.DU" ) ); - PackagesDuFileReader reader; - reader.setPkgConsumer( bind( &Impl::consumePkgDu, this, _1 ) ); - reader.setSrcPkgConsumer( bind( &Impl::consumeSrcPkgDu, this, _1 ) ); - - CombinedProgressData progress( _ticks, PathInfo(inputfile).size() ); - reader.parse( inputfile, progress ); - } + if ( ! inputfile.empty() ) + { + PackagesDuFileReader reader; + reader.setPkgConsumer( bind( &Impl::consumePkgDu, this, _1 ) ); + reader.setSrcPkgConsumer( bind( &Impl::consumeSrcPkgDu, this, _1 ) ); + + CombinedProgressData progress( _ticks, PathInfo(inputfile).size() ); + reader.parse( inputfile, progress ); + } + } // Now process the rest of RepoIndex for ( RepoIndex::FileChecksumMap::const_iterator it = _repoIndex->metaFileChecksums.begin(); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org