D21367: kioexec: change the scary debug messages for delayed deletion

Peter Wu noreply at phabricator.kde.org
Thu May 23 16:39:50 BST 2019


Lekensteyn created this revision.
Lekensteyn added reviewers: elvisangelaccio, dfaure.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
Lekensteyn requested review of this revision.

REVISION SUMMARY
  After resuming my laptop, I found this scary message in journalctl:
  
    org.kde.Spectacle[123]: about to delete "/home/user/Pictures" containing "Screenshot_....png"
  
  Apparently this message is due to me closing Kolourpaint and Spectacle
  right before system sleep which scheduled a delayed deletion. Make the
  debug messages more obvious to avoid any doubt.

TEST PLAN
  Assume /tmp to be non-empty, then `touch /tmp/x.png` and `kioexec --tempfiles ls /tmp/x.png`. Expected output:
  
    EXEC "/usr/bin/ls /tmp/x.png"
    /tmp/x.png
    EXEC done
    sleeping for 3 minutes before deleting file...
    Three minutes have passed, deleting "/tmp/x.png"
  
  Doing something similar, but with `/tmp/z/x.txt` in a directory with no other files:
  
    ...
    Three minutes have passed, deleting "/tmp/z/some.txt"
    Removed empty parent directory "/tmp/z"
  
  Discussion: perhaps the sleep should only occur if the problematic loffice/Amarok case was detected, namely a process that quits quickly (e.g. <3 seconds?). However since I did not ran into any issue so far, I'll limit it to this error message change.
  Deleting the parent directory is also questionable, but again it did not actually trigger any issue so far.

REPOSITORY
  R241 KIO

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

AFFECTED FILES
  src/kioexec/main.cpp

To: Lekensteyn, elvisangelaccio, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190523/80a31599/attachment.html>


More information about the Kde-frameworks-devel mailing list