mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-27 01:56:32 -05:00
Add DB_DIR placeholder for autoopen urls
This commit is contained in:
parent
bcb64a231f
commit
d863496f62
3 changed files with 13 additions and 6 deletions
|
|
@ -1973,15 +1973,16 @@ void DatabaseWidget::processAutoOpen()
|
|||
}
|
||||
QFileInfo filepath;
|
||||
QFileInfo keyfile;
|
||||
QString databaseUrl = entry->resolveMultiplePlaceholders(entry->url());
|
||||
|
||||
if (entry->url().startsWith("file://")) {
|
||||
QUrl url(entry->url());
|
||||
if (databaseUrl.startsWith("file://")) {
|
||||
QUrl url(databaseUrl);
|
||||
filepath.setFile(url.toLocalFile());
|
||||
} else {
|
||||
filepath.setFile(entry->url());
|
||||
filepath.setFile(databaseUrl);
|
||||
if (filepath.isRelative()) {
|
||||
QFileInfo currentpath(m_db->filePath());
|
||||
filepath.setFile(currentpath.absoluteDir(), entry->url());
|
||||
filepath.setFile(currentpath.absoluteDir(), databaseUrl);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue