Mailinglist Archive: zypp-commit (78 mails)

< Previous Next >
[zypp-commit] <libzypp> master : Use filesystem::exchange to exchange config files.
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Fri, 22 May 2009 15:39:23 +0200
  • Message-id: <E1M7UyP-0007KR-R0@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit c9406e61eb8081dc694b3b2269ec75234697f47b
Author: Michael Andres <ma@xxxxxxx>
Date: Fri May 22 15:39:23 2009 +0200

Use filesystem::exchange to exchange config files.
---
zypp/RepoManager.cc | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/zypp/RepoManager.cc b/zypp/RepoManager.cc
index 42f73bf..9ab4b3d 100644
--- a/zypp/RepoManager.cc
+++ b/zypp/RepoManager.cc
@@ -974,11 +974,7 @@ namespace zypp

// ok we have the metadata, now exchange
// the contents
-
- filesystem::TmpDir oldmetadata( filesystem::TmpDir::makeSibling(
rawpath ) );
- filesystem::rename( rawpath, oldmetadata.path() );
- // move the just downloaded there
- filesystem::rename( tmpdir.path(), rawpath );
+ filesystem::exchange( tmpdir.path(), rawpath );

// we are done.
return;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages