mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04: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
|
||||
if (!file->open(QIODevice::ReadWrite)) {
|
||||
if (!file->open(QIODevice::ReadOnly)) {
|
||||
// can only open read-only
|
||||
m_curDbStruct.readOnly = true;
|
||||
}
|
||||
else {
|
||||
// can't open
|
||||
return;
|
||||
}
|
||||
else {
|
||||
// can only open read-only
|
||||
m_curDbStruct.readOnly = true;
|
||||
}
|
||||
}
|
||||
|
||||
m_curDbStruct.file = file.take();
|
||||
|
Loading…
Reference in New Issue
Block a user