D5877: Use absolute path instead of "." as path to watch

Elvis Angelaccio noreply at phabricator.kde.org
Mon May 15 22:09:46 UTC 2017


elvisangelaccio created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  Either "." was explicitly added (in which case we use the absolute path
  of the cwd), or it's added as side effect of something else. For example
  in bug #374075 KIO adds ":/kio5/newfile-templates" as path to watch
  (this is probably another bug in itself) and this results in "." being
  passed as _path of addEntry().
  
  If we are already watching "/home/user", this breaks the emission
  of the dirty() signal for every new children of "/home/user" (somehow,
  the relative path is used for them, e.g. "./foo.txt" instead of
  "/home/user/foo.txt"). In particular, in inotifyEventReceived()
  e->m_client is empty and so e->path is not added to
  e->m_pendingFileChanges.
  
  Replacing "." with the absolute path fixes this issue.
  
  BUG: 374075
  FIXED-IN: 5.35

TEST PLAN
  From dolphin, Create New -> Text File in a folder which is also the current working
  directory of the dolphin process.

REPOSITORY
  R244 KCoreAddons

BRANCH
  master

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

AFFECTED FILES
  autotests/kdirwatch_unittest.cpp
  src/lib/io/kdirwatch.cpp

To: elvisangelaccio, dfaure
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170515/efe4ee2c/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list