aboutsummaryrefslogtreecommitdiff
path: root/src/evidence.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <Varsash@Gmail.com>2022-07-29 18:39:10 +0300
committerGitHub <noreply@github.com>2022-07-29 18:39:10 +0300
commitda5437ab6fcb06cc238f7336b5b88b15fc228e0b (patch)
treeb68dd125db1401cbb35dfa014a38a5b71f7c515c /src/evidence.cpp
parent3c3002122ece4909ad9ca49fbf67715379c4f5ef (diff)
Fix evidence image lookup behaving weirdly if the mounted path from which it looks for evidence starts with "base" , so "base_Extra" will be ignored for example if it's next to the normal "base" folder (#825)
Start evidence image search in the base evidence folder rather than the topmost mounted path
Diffstat (limited to 'src/evidence.cpp')
-rw-r--r--src/evidence.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/evidence.cpp b/src/evidence.cpp
index 34f09a6e..13634ec0 100644
--- a/src/evidence.cpp
+++ b/src/evidence.cpp
@@ -398,7 +398,7 @@ void Courtroom::on_evidence_image_name_edited()
void Courtroom::on_evidence_image_button_clicked()
{
- QDir dir(ao_app->get_real_path(ao_app->get_evidence_path("")));
+ QDir dir("base/evidence/");
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::ExistingFile);
dialog.setNameFilter(tr("Images (*.png)"));
@@ -418,7 +418,7 @@ void Courtroom::on_evidence_image_button_clicked()
bases.prepend(ao_app->get_base_path());
for (const QString &base : bases) {
QDir baseDir(base);
- if (filename.startsWith(baseDir.absolutePath())) {
+ if (filename.startsWith(baseDir.absolutePath() + "/")) {
dir.setPath(baseDir.absolutePath() + "/evidence");
break;
}