summaryrefslogtreecommitdiff
path: root/apt-inst/extract.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2013-04-23 08:08:54 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2013-04-23 08:08:54 +0200
commit3444603f5ff2b4c4816e45e686e06e01df31cdc4 (patch)
treeb0e63e9bc86ca6d39f6987381ca7bfa64e186048 /apt-inst/extract.cc
parent52d5690b47bd4efe425fa23d9f6559bb44324cd1 (diff)
parent3278fe66567d149ea92c1afa78941f2bc3c71c85 (diff)
merged debian-sid branch and resolved conflicts
Diffstat (limited to 'apt-inst/extract.cc')
-rw-r--r--apt-inst/extract.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/apt-inst/extract.cc b/apt-inst/extract.cc
index 29e163028..2c95fba92 100644
--- a/apt-inst/extract.cc
+++ b/apt-inst/extract.cc
@@ -81,8 +81,6 @@ pkgExtract::pkgExtract(pkgFLCache &FLCache,pkgCache::VerIterator Ver) :
/* This performs the setup for the extraction.. */
bool pkgExtract::DoItem(Item &Itm,int &Fd)
{
- char Temp[sizeof(FileName)];
-
/* Strip any leading/trailing /s from the filename, then copy it to the
temp buffer and re-apply the leading / We use a class variable
to store the new filename for use by the three extraction funcs */
@@ -183,6 +181,7 @@ bool pkgExtract::DoItem(Item &Itm,int &Fd)
// See if we can recover the backup file
if (Nde.end() == false)
{
+ char Temp[sizeof(FileName)];
snprintf(Temp,sizeof(Temp),"%s.%s",Itm.Name,TempExt);
if (rename(Temp,Itm.Name) != 0 && errno != ENOENT)
return _error->Errno("rename",_("Failed to rename %s to %s"),