1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-08-03 14:25:38 +02:00

download: create directory if it does not exist

GitLab: #673
Change-Id: Ib81ea66336b075fc7c51782d3933f06db91201f9
This commit is contained in:
Aline Gondim Santos 2022-12-15 09:54:01 -03:00
parent b862c4483e
commit 482c334f3e

View file

@ -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);
}