Bug 141676 - file watch does not reload when file is deleted and then recreated
Summary: file watch does not reload when file is deleted and then recreated
Status: RESOLVED INTENTIONAL
Alias: None
Product: kpdf
Classification: Unmaintained
Component: general (show other bugs)
Version: 0.5.5
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-14 11:30 UTC by kde
Modified: 2008-03-18 00:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kde 2007-02-14 11:30:15 UTC
Version:           0.5.5 (using KDE KDE 3.5.5)
Installed from:    Fedora RPMs
OS:                Linux

I'm using KPDF 0.5.5 on KDE 3.5.5-0.2.fc5 Fedora Core
Release 2.6.18-1.2257.fc5.

Watching a pdf file created by LaTeXPDF usually works
fine, but occasionally it stops functioning. I haven't
figured out what triggers this, but I have found a way
to recover functionality. Namely, I open the file in
KGhostview and tick on "watch file" (which is not 
the default in KGhostview). Once KGhostview watches
the file once successfully, I then open the file in 
KPDF, which now starts to correctly watch the file again.
Comment 1 kde 2007-02-14 11:50:31 UTC
What triggers the problem in the watch file function seems to be any error
that the LaTeXPDF encounters in the compilation. 
Comment 2 Albert Astals Cid 2007-02-14 19:26:43 UTC
Does that situation delete the pdf file?
Comment 3 Pino Toscano 2007-09-16 03:00:19 UTC
Ioannis, is there any news about this problem? What about Albert's question?
Comment 4 Wilbert Berendsen 2008-02-16 11:04:10 UTC
Same problem here, using LilyPond and GhostScript.

Lilypond deletes the PDF file first, and then outputs a new one (the inode number changes).

KPDF most times stops watching a file when it is deleted and recreated a very short while after.

It would be very nice if KPDF just keeps wachting a file, even when it is deleted and recreated again.
Comment 5 Wilbert Berendsen 2008-02-16 11:28:25 UTC
In the source of both KPDF and Okular I see that it listens to the KDirWatch signal dirty(), but not deleted() or created().

Should this be fixed in KDirWatch or KPDF/Okular?

(The problem is stat KPDF/Okular stop watching a file when it is deleted and recreated shortly thereafter)
Comment 6 Albert Astals Cid 2008-03-18 00:05:34 UTC
The issue has been implemented on Okular and will be released with KDE 4.1. It won't be fixed on KPDF.