mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-26 09:21:21 -05:00
Fix check if file can be opened read only.
This commit is contained in:
parent
64170a16ab
commit
272da8c99c
@ -85,13 +85,13 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
|
|||||||
// TODO error handling
|
// TODO error handling
|
||||||
if (!file->open(QIODevice::ReadWrite)) {
|
if (!file->open(QIODevice::ReadWrite)) {
|
||||||
if (!file->open(QIODevice::ReadOnly)) {
|
if (!file->open(QIODevice::ReadOnly)) {
|
||||||
// can only open read-only
|
|
||||||
m_curDbStruct.readOnly = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// can't open
|
// can't open
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// can only open read-only
|
||||||
|
m_curDbStruct.readOnly = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_curDbStruct.file = file.take();
|
m_curDbStruct.file = file.take();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user