[mythtv-commits] mythtv commit: r21267 by cpinkham
mythtv at cvs.mythtv.org
mythtv at cvs.mythtv.org
Fri Aug 14 07:16:53 UTC 2009
Author: cpinkham
Date: 2009-08-14 07:16:53 +0000 (Fri, 14 Aug 2009)
New Revision: 21267
Changeset: http://cvs.mythtv.org/trac/changeset/21267
Modified:
trunk/mythtv/programs/mythbackend/mainserver.cpp
Log:
Fix a couple issues with the new delete file code and MainServer::DeleteFile().
MainServer::DeleteFile() description said it returned negative on error, but
a valid result was -1 when DeletesFollowLinks==0 and the 'file' being
deleted was actually a symlink. This patch changes the result in this
situation to be -2 to differentiate between this and an error of -1.
In the new DELETE_FILE code path, this was causing the symlink to be
deleted, but the backend command would return an error to the caller.
Add back in a check for fd >= 0 before spawning the truncate thread, because
in the case above, fd == -2 and there is no file to truncate.
More information about the mythtv-commits
mailing list