commit fe2ec8539504b7a548a3ed41ed3551a3a2002236
parent bafe2d16f410d8d8674e2f0c482474e5fa616ef2
Author: cfillion <cfillion@users.noreply.github.com>
Date: Sun, 5 Jun 2016 21:53:57 -0400
transaction: fix removal of obsolete files
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/transaction.cpp b/src/transaction.cpp
@@ -165,6 +165,9 @@ void Transaction::install(const Version *ver,
else
type = InstallTicket::Install;
+ // get current files before overwriting the entry
+ const set<Path> ¤tFiles = m_registry->getFiles(regEntry);
+
// prevent file conflicts (don't worry, the registry push is reverted in runTasks)
try {
vector<Path> conflicts;
@@ -191,8 +194,6 @@ void Transaction::install(const Version *ver,
if(!m_indexes.count(ri))
m_indexes.insert(ri);
- const set<Path> ¤tFiles = m_registry->getFiles(regEntry);
-
InstallTask *task = new InstallTask(ver, currentFiles, this);
task->onCommit([=] {