On Sat, Jan 16, 2016 at 11:13:23PM +0100, Stephan Witt wrote:
> The attached patch fixes the broken detection of GIT version control.
> It seems so that Qt is caching the file meta data and fools the test
> of file emptiness. Perhaps this has changed with Qt5 and didn’t happen
> with Qt4… A proper solution for VCS would move doVCCommandWithOutput
> to VCS::doVCCommandWithOutput and use it where a temporary file for
> output is used. I’ll do this if such a change is allowed.

I'm fine with the change in your patch. I am familiar with this type of
fix and the change is contained in VCBackend. I have not tested but if
it fixes it for you then go ahead. +1

> Perhaps a better fix is to disable QFileInfo caching or to call
> fi.refresh() every time in FileName::isFileEmpty()?
> 
> Is anybody aware of other places having this kind of problem?

Yes, I fixed one here: 43ca05ea. See the discussion in that commit
message. In particular, Pavel suggests that emptying the cache often
would cause a significant performance decrease for some use cases:
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg188628.html

Scott

Attachment: signature.asc
Description: PGP signature

Reply via email to