[mythtv] Ticket #11221: The use of OpenAndUnlink() in mainserver.cpp::DeleteFile() prevents the use of CIFS

Greg G. dargllun at googlemail.com
Wed Nov 7 07:52:29 UTC 2012

On 07.11.2012 01:33, Michael T. Dean wrote:
> The ticket should have usable information that doesn't require the
> developer who handles it to read through hundreds of messages before
> handling it.  If I have 30min to work on MythTV one evening, I won't
> even go near a ticket with lots of messages that require lots of reading
> because it would take up all my MythTV time, and I won't get any fix in

Makes sense. Though, both the idealist and the developer inside me tell
me that when fixing even a small bug, you are still better off when you
have all the different arguments available that lead to the conclusion
laid down in the ticket. Anyway...

> I'll look into what's happening when I get a chance (probably in a
> couple of weeks), but we should /only/ ever be doing an open-and-unlink
> when using slow deletes.  If that's no longer the case then something is
> very wrong.

I see. Looking into mythbackend/mainserver.cpp I notice this:

- MainServer::DeleteFile() calls OpenAndUnlink()

- In MainServer::DoDeleteThread(), MainServer::DeleteFile() is indeed
used only when slow deletes are enabled

- But MainServer::HandleDeleteFile(QString, QString, PlaybackSock *)
calls MainServer::DeleteFile() unconditionally.

Since I noticed this problem with SGs on CIFS, it seems very likely that
I run into this. Probably that HandleDeleteFile needs to be made aware
of the slow deletes setting.


More information about the mythtv-dev mailing list