forked from qt-creator/qt-creator
QmlDesigner: Create imports directory before copying template files
Fixes: QDS-11946 Change-Id: I13f200c18d8b4775d6353ba994b83b8b72313e60 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -289,8 +289,13 @@ bool ensureDataStoreExists(bool &justCreated)
|
||||
return false;
|
||||
}
|
||||
|
||||
templatePath.copyFile(filePath);
|
||||
if (filePath.exists()) {
|
||||
if (!filePath.parentDir().ensureWritableDir()) {
|
||||
qWarning() << Q_FUNC_INFO << __LINE__ << "Cannot create directory"
|
||||
<< filePath.parentDir();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (templatePath.copyFile(filePath)) {
|
||||
justCreated = true;
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user