KCoreDirLister: Do not list files again if the new url has same job

When getting a redirection URL, we check if the URL already has a job or not. We also check that it's not the current job we're working on.

If it has same job as given to the slot as parameter, we are not working on a new directory, but an old one. This can happen when we are in sftp://foo@bar/home/foo, then type sftp://foo@bar which in turn redirects us back to sftp://foo@bar/home/foo.

In these cases, we know we're not working on a new directory, so we handle it through cache or refreshing it.

This fixes crashes with the oldJob assert and also gives back to Qt the trailing slash handling, while keeping expected behavior, practically reverting 883a16eb

BUG: 507278 CCBUG: 451050 CCBUG: 507185

Edited by Tracey Clark

Merge request reports

Loading