- assert the destination directory before we use as cache
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Sat, 21 Jul 2007 06:01:15 +0000 (06:01 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Sat, 21 Jul 2007 06:01:15 +0000 (06:01 +0000)
  for Fetcher, because it checks its existence when adding it

zypp/RepoManager.cc

index 27b041d..9d7e6f2 100644 (file)
@@ -339,6 +339,7 @@ namespace zypp
         }
 
         Pathname rawpath = rawcache_path_for_repoinfo( _pimpl->options, info );
+        filesystem::assert_dir(rawpath);
         oldstatus = metadataStatus(info);
 
         if ( ( repokind.toEnum() == RepoType::RPMMD_e ) ||
@@ -428,7 +429,6 @@ namespace zypp
         // ok we have the metadata, now exchange
         // the contents
         TmpDir oldmetadata;
-        filesystem::assert_dir(rawpath);
         filesystem::rename( rawpath, oldmetadata.path() );
         // move the just downloaded there
         filesystem::rename( tmpdir.path(), rawpath );