Restrict CopyFileData to writing to already existing files.
This commit is contained in:
parent
3903ae1b83
commit
81a5eae665
|
@ -179,6 +179,11 @@ QVariantMap ExternalCommandHelper::CopyFileData(const QString& sourceDevice, con
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only allow writing to existing files.
|
||||||
|
if(!std::filesystem::exists(targetPath)) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
QVariantMap reply;
|
QVariantMap reply;
|
||||||
reply[QStringLiteral("success")] = true;
|
reply[QStringLiteral("success")] = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue