Skip to content
Commit fbe7067b authored by Igor Kushnir's avatar Igor Kushnir Committed by Milian Wolff
Browse files

Don't create a file in a directory before removing it recursively

bc828ea9 removed no longer necessary
KLockFile::Ptr m_lock from ItemRepositoryRegistry, but failed to remove
the lockForWriting() call, which worked around an issue related to
m_lock. From the documentation to QDir::removeRecursively():
  If a file or directory cannot be removed, removeRecursively() keeps
  going and attempts to delete as many files and sub-directories as
  possible, then returns false.

Clearly, any protection offered by creating the "is_writing" file in the
directory is unreliable because removeRecursively() may remove the newly
created file first.
parent a1b364ab
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