From 15032eec2d508df3c63b532be22f488d240159a2 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 27 Jul 2010 13:57:42 +0200 Subject: * apt-pkg/cdrom.cc: - Use link() instead of rename() for creating the CD database backup; otherwise there would be a short time without any database. --- apt-pkg/cdrom.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/cdrom.cc') diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 93deb49c4..e3e0027fc 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -383,7 +383,7 @@ bool pkgCdrom::WriteDatabase(Configuration &Cnf) Out.close(); - rename(DFile.c_str(),string(DFile + '~').c_str()); + link(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()); -- cgit v1.2.3