Commit 06ad8196 authored by Kai Koehne's avatar Kai Koehne
Browse files

sdktool: Check for return value of mkpath

Change-Id: I946e2d5195ea0f9813fe7ebaa7dc2434579abbe5
Reviewed-by: default avatarTobias Hunger <>
parent 57a6f04c
......@@ -120,9 +120,14 @@ bool Operation::save(const QVariantMap &map, const QString &file) const
return false;
Utils::FileName dir = path.parentDir();
if (!dir.toFileInfo().exists())
Utils::FileName dirName = path.parentDir();
QDir dir(dirName.toString());
if (!dir.exists() && !dir.mkpath(dirName.toString())) {
std::cerr << "Error: Could not create directory " << qPrintable(dirName.toString())
<< "." << std::endl;
return false;
Utils::PersistentSettingsWriter writer(path, QLatin1String("unknown"));
return, 0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment