summaryrefslogtreecommitdiff
path: root/src/lib/buildgraph/artifactcleaner.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-08-23 15:24:19 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-08-23 16:24:32 +0200
commitfd2a5d4ba2c452d312094cfc215ee9234b0db5bf (patch)
treeefe5a7e9564abb5d6973d43e8bade06c6dfcc8df /src/lib/buildgraph/artifactcleaner.cpp
parent0c975063eefb4aef1e76611c01c739d976e1692d (diff)
downloadqbs-fd2a5d4ba2c452d312094cfc215ee9234b0db5bf.tar.gz
Fix over-eager cleaning operation.
Do not remove empty directories outside of the build tree. Artifacts can end up there via product.destinationDirectory. Task-number: QBS-325 Change-Id: I457400c31fa5f6e342c5479fd8e80fba8553bb13 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/buildgraph/artifactcleaner.cpp')
-rw-r--r--src/lib/buildgraph/artifactcleaner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/buildgraph/artifactcleaner.cpp b/src/lib/buildgraph/artifactcleaner.cpp
index bf7593def..f4c5b47b0 100644
--- a/src/lib/buildgraph/artifactcleaner.cpp
+++ b/src/lib/buildgraph/artifactcleaner.cpp
@@ -155,7 +155,7 @@ void ArtifactCleaner::cleanup(const TopLevelProjectPtr &project,
// Directories created during the build are not artifacts (TODO: should they be?),
// so we have to clean them up manually.
foreach (const QString &dir, directories) {
- if (FileInfo(dir).exists())
+ if (dir.startsWith(project->buildDirectory) && FileInfo(dir).exists())
removeEmptyDirectories(dir, options);
}
m_observer->incrementProgressValue();