mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00
kio: check if the local watcher exists before attempting to remove entries from it in KDirListerPrivate::unwatchUrl()
for the rare case of currently listing remote protocol (such as filenamesearch:/) and local file that is not watched being deleted (the signal is emitted by KDirNotify) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
6deb136bad
commit
7ca48a2806
1 changed files with 5 additions and 3 deletions
|
@ -149,9 +149,11 @@ void KDirListerPrivate::unwatchUrl(const KUrl &it)
|
|||
if (it.isLocalFile()) {
|
||||
const QString localfile = it.toLocalFile();
|
||||
kDebug(7003) << "no longer watching" << localfile;
|
||||
if (dirWatch) {
|
||||
// not tracking what it is, KDirWatch does tho
|
||||
dirWatch->removeDir(localfile);
|
||||
dirWatch->removeFile(localfile);
|
||||
}
|
||||
} else {
|
||||
kDebug(7003) << "no longer watching remote" << it.url();
|
||||
org::kde::KDirNotify::emitLeftDirectory(it.url());
|
||||
|
|
Loading…
Add table
Reference in a new issue