Race condition with data loss in ReadWritePart

Martin Pley kde-core at pley.org
Sat Feb 23 17:45:50 GMT 2008


Hi,

I noticed a race condition with data loss in ReadWritePart:

Try to open a non-local-file from a slow or offline server. Then, instead of 
waiting for the file, just open another local file. Now, when you delete the 
part, the file is deleted(!).

If I see it correctly, this is because m_bTemp is set to "true" while opening 
the remote file. And when you open the local file it will not be set to false 
again.

Kind regards
Martin




More information about the kde-core-devel mailing list