diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-08-06 15:53:50 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-08-06 15:53:50 +0200 |
commit | 700616ab8792227768cd73aa28eb69b8010ac90a (patch) | |
tree | 9630cb40d10e13708d724f49cc14787cc86a9a94 /apt-pkg/cdrom.cc | |
parent | b9c917bd62e7b1eb227d4f3a7321559ddb96e494 (diff) | |
parent | 4caf8231804dfce5a1a58a56dfe4df21a31be363 (diff) |
merged from david
Diffstat (limited to 'apt-pkg/cdrom.cc')
-rw-r--r-- | apt-pkg/cdrom.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 8462e8286..699f66fb3 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -413,8 +413,8 @@ bool pkgCdrom::WriteDatabase(Configuration &Cnf) Out.close(); - if (FileExists(DFile) == true && link(DFile.c_str(),string(DFile + '~').c_str()) != 0) - return _error->Errno("link", "Failed to link %s to %s~", DFile.c_str(), DFile.c_str()); + if (FileExists(DFile) == true) + rename(DFile.c_str(), string(DFile + '~').c_str()); if (rename(NewFile.c_str(),DFile.c_str()) != 0) return _error->Errno("rename","Failed to rename %s.new to %s", DFile.c_str(),DFile.c_str()); |