Skip to content

Commit

Permalink
#5146 If user enters a relative file path to the database dialog, a w…
Browse files Browse the repository at this point in the history
…arning will issued to the user pointing out actual resolved path for the relative path entered.
  • Loading branch information
pawelsalawa committed Dec 1, 2024
1 parent 8789c1f commit c5e4708
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# ChangeLog

### 3.4.8
- CHANGE: #5146 If user enters a relative file path to the database dialog, a warning will issued to the user pointing out actual resolved path for the relative path entered.
- BUGFIX: #5145 Fixed Extensions Manager crashing the app if the percentile extension was loaded before. The percentile SQLite extension became corrupted in SQLite 3.46.x, then it got fixed, but the fix is not included in SQLite 3.47.1 source package.
- BUGFIX: #5144 Fixed Extensions Manager commit button when all extensions got removed from the list.

Expand Down
7 changes: 7 additions & 0 deletions SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,13 @@ bool DbDialog::validate()
setValidState(ui->fileEdit, false, tr("Enter a database file path."));
fileState = false;
}
else if (QFileInfo(getPath()).isRelative())
{
setValidStateWarning(ui->fileEdit,
tr("You're using a relative file path, which will be resolved to \"%1\" according to the application's working directory. It's always better to use absolute file path to avoid unexpected database location.")
.arg(QFileInfo(getPath()).absoluteFilePath()));
fileState = false;
}

if (fileState)
{
Expand Down

0 comments on commit c5e4708

Please sign in to comment.