summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.cc
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2017-01-30 11:11:45 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2017-01-30 11:11:45 -0800
commit98639cb8c8b5ee0bec3449a2c3e08bc0177afc12 (patch)
tree2522bb894e7857b0999151cc0a16178cf220ed53 /apt-pkg/acquire-item.cc
parentf1788cf1c819d4c003ae046367af00203cd027d6 (diff)
Symlinking final file failed is a common issue :/.
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r--apt-pkg/acquire-item.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 12d035207..072a4c6e8 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -3071,6 +3071,7 @@ void pkgAcqIndex::StageDownloadDone(string const &Message)
// copy FinalFile into partial/ so that we check the hash again
string const FinalFile = GetExistingFilename(GetFinalFileNameFromURI(Target.URI));
DestFile = GetKeepCompressedFileName(GetPartialFileNameFromURI(Target.URI), Target);
+ unlink(DestFile.c_str());
if (symlink(FinalFile.c_str(), DestFile.c_str()) != 0)
_error->WarningE("pkgAcqIndex::StageDownloadDone", "Symlinking final file %s back to %s failed", FinalFile.c_str(), DestFile.c_str());
else