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
This commit is contained in:
parent
3c3002122e
commit
da5437ab6f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user