Skip to content
Commit 4288d7e7 authored by Simeon Bird's avatar Simeon Bird Committed by Simeon Bird
Browse files

Fix crash in KIO due to exposing inconsistent views of internal data.

This can be triggered by renaming a directory while one of the files in
it is open in gwenview.

It occurs because when KCoreDirListerCache::emitRedirections is called,
itemsInUse contains the old url. However, KDirLister::Private::redirect
changes lstDirs to the new url. Thus at this point lstDirs contains an
item not in itemsInUse, which causes an assertion if forgetDirs is
called.

In gwenview, the redirection signal is connected to openURL. This calls
forgetDirs, and causes the assertion.

The solution: update itemsInUse *before* emitting redirections.

This fixes the crash, but gwenview opens the first file in
the new directory instead of the file open before renaming.
This is probably an unrelated gwenview bug.

REVIEW: 117345
parent a2acf504
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment