D18698: [baloo/KInotify] Notify if folder was moved from unwatched place

Stefan BrĂ¼ns noreply at phabricator.kde.org
Mon Feb 4 01:39:56 GMT 2019


bruns added a comment.


  To which "file1"/"file2" are you referring in the summary? The commit log should be self contained.

INLINE COMMENTS

> kinotify.cpp:431
> +                    }
> +                    addWatch(QFile::decodeName(path), d->mode, d->flags);
> +                } else {

`QFile:decodeName(path)` called twice for the same path

> kinotify.cpp:431
> +                    }
> +                    addWatch(QFile::decodeName(path), d->mode, d->flags);
> +                } else {

This also traverses the directory tree twice, once with all items (here), and once for  directories (in KInotify::addWatch(...)).
Calling `if (it.fileInfo().isDir()) { d->addWatch(it.filePath()) }` in the loop should have the same effect.

REPOSITORY
  R293 Baloo

BRANCH
  add-watch-moved (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D18698

To: poboiko, #baloo, #frameworks, ngraham
Cc: bruns, ngraham, kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, spoorun, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190204/5ed6a0eb/attachment.html>


More information about the Kde-frameworks-devel mailing list