[mythtv] Patch to DO deletion when file doesn't exit

Chris Pinkham cpinkham at bc2va.org
Thu Feb 17 15:49:03 UTC 2005


> "Chris Pinkham" <cpinkham at bc2va.org> writes:
> 
> > I think that's what he said. :)  The filesize in the DB is incremented
> > during recordings so anything with a 0 could safely be deleted.
> 
> I didn't actually mean "file size in the DB is 0".  I meant "stat()"
> returns filesize of 0 (as opposed to file not found).

If stat() returned 0 bytes then the file exists and would be deleteable
even with the old code.

Allowing deletes when the recorded.filesize column is 0 will cover the
case where the file was never even created so we should be covered now
I believe.  The filesize was added to the DB so we didn't have to stat
every file everytime we loaded the recording list, so the filesize in the
DB should be sufficient for the case of 0-byte files.

I put the fix in CVS last night, so people should be able to delete
failed recordings now even if the recording file was never created.
-- 

Chris



More information about the mythtv-dev mailing list