summaryrefslogtreecommitdiff
path: root/apt-pkg/indexcopy.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-08-06 15:53:50 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-08-06 15:53:50 +0200
commit700616ab8792227768cd73aa28eb69b8010ac90a (patch)
tree9630cb40d10e13708d724f49cc14787cc86a9a94 /apt-pkg/indexcopy.cc
parentb9c917bd62e7b1eb227d4f3a7321559ddb96e494 (diff)
parent4caf8231804dfce5a1a58a56dfe4df21a31be363 (diff)
merged from david
Diffstat (limited to 'apt-pkg/indexcopy.cc')
-rw-r--r--apt-pkg/indexcopy.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc
index e29e2819c..c97445326 100644
--- a/apt-pkg/indexcopy.cc
+++ b/apt-pkg/indexcopy.cc
@@ -810,9 +810,14 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/
(*I).c_str() + CDROM.length());
string TargetF = _config->FindDir("Dir::State::lists") + "partial/";
TargetF += URItoFileName(S);
+ FileFd Target;
if (_config->FindB("APT::CDROM::NoAct",false) == true)
+ {
TargetF = "/dev/null";
- FileFd Target(TargetF,FileFd::WriteAtomic);
+ Target.Open(TargetF,FileFd::WriteExists);
+ } else {
+ Target.Open(TargetF,FileFd::WriteAtomic);
+ }
FILE *TargetFl = fdopen(dup(Target.Fd()),"w");
if (_error->PendingError() == true)
return false;