Skip to content
Snippets Groups Projects
Commit 482c334f authored by Aline Gondim Santos's avatar Aline Gondim Santos
Browse files

download: create directory if it does not exist

GitLab: #673
Change-Id: Ib81ea66336b075fc7c51782d3933f06db91201f9
parent b862c448
No related branches found
No related tags found
No related merge requests found
......@@ -192,6 +192,10 @@ DataTransferModel::copyTo(const QString& accountId,
filename = srcfi.isSymLink() ? srcfi.symLinkTarget() : path;
auto dest = pimpl_->getUniqueFilePath(filename, destPath);
qDebug() << "Copy to " << dest;
// create directory if it does not exist
QDir dir(destPath);
if (!dir.exists())
dir.mkpath(".");
src.copy(dest);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment