From 371ed356770c4e93c82760a907a6303b8e779fd0 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Wed, 13 Mar 2013 12:34:49 -0400 Subject: [PATCH] added a check to only compute the matrix if it doesn't already exist --- sdk/plugins/youtube.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sdk/plugins/youtube.cpp b/sdk/plugins/youtube.cpp index ce90df7..93326f0 100644 --- a/sdk/plugins/youtube.cpp +++ b/sdk/plugins/youtube.cpp @@ -30,9 +30,12 @@ class YouTubeFacesDBTransform : public UntrainableMetaTransform << "-parallelism" << QString::number(Globals->parallelism) << "-path" << Globals->path << "-compare" << File(words[2]).resolved() << File(words[3]).resolved() << matrix; - mutex.lock(); - int result = QProcess::execute(QCoreApplication::applicationFilePath(), arguments); + mutex.lock(); + int result = 0; + if (!QFileInfo(matrix).exists()) + QProcess::execute(QCoreApplication::applicationFilePath(), arguments); mutex.unlock(); + if (result != 0) qWarning("Process for computing %s returned %d.", qPrintable(matrix), result); dst = Template(); -- libgit2 0.21.4