mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-12 15:59:58 -05:00
Fix access denied errors when using KeeShare export/sync (#7322)
This commit is contained in:
parent
bce8c84c26
commit
6a12f450e6
@ -155,13 +155,6 @@ ShareObserver::Result ShareExport::intoContainer(const QString& resolvedPath,
|
||||
const KeeShareSettings::Reference& reference,
|
||||
const Group* group)
|
||||
{
|
||||
QFile file(resolvedPath);
|
||||
const bool fileOpened = file.open(QIODevice::WriteOnly);
|
||||
if (!fileOpened) {
|
||||
qWarning("Opening export file failed");
|
||||
return {resolvedPath, ShareObserver::Result::Error, file.errorString()};
|
||||
}
|
||||
|
||||
QScopedPointer<Database> targetDb(extractIntoDatabase(reference, group));
|
||||
if (resolvedPath.endsWith(".kdbx.share")) {
|
||||
// Write database to memory and sign it
|
||||
|
@ -47,7 +47,6 @@ ShareObserver::Result ShareImport::containerInto(const QString& resolvedPath,
|
||||
const KeeShareSettings::Reference& reference,
|
||||
Group* targetGroup)
|
||||
{
|
||||
// TODO: Read signing certificate as well, but don't check validity
|
||||
QByteArray dbData;
|
||||
|
||||
auto uf = unzOpen64(resolvedPath.toLatin1().constData());
|
||||
@ -71,6 +70,7 @@ ShareObserver::Result ShareImport::containerInto(const QString& resolvedPath,
|
||||
return {reference.path, ShareObserver::Result::Error, file.errorString()};
|
||||
}
|
||||
dbData = file.readAll();
|
||||
file.close();
|
||||
}
|
||||
|
||||
QBuffer buffer(&dbData);
|
||||
|
Loading…
Reference in New Issue
Block a user