[mythtv-commits] Ticket #1585: Change permissions on preview .png files

MythTV mythtv at cvs.mythtv.org
Sun Mar 26 15:59:26 UTC 2006


#1585: Change permissions on preview .png files
------------------------------+---------------------------------------------
 Reporter:  sbower at cisco.com  |       Owner:  daneilk
     Type:  patch             |      Status:  new    
 Priority:  minor             |   Milestone:         
Component:  mythtv            |     Version:         
 Severity:  low               |  
------------------------------+---------------------------------------------
 See http://www.gossamer-threads.com/lists/mythtv/dev/191628#191628

 This patch implements these changes to the PreviewGenerator save
 functionality:

 - After updating the preview .png file, change its permissions to 0666 so
 that other processes running as different UIDs can update it if they need
 to.

 - If saving the file failes, and the .png file exists, attempt to save the
 preview to .png.new, and then move it over the old .png file.  Also set
 perms to 0666.

 - If both of the above fail, and !localOnly, use RemotePreviewRun to ask
 the backend to do it for us.

 It might be better to do the third test in the Run() method so that
 LocalPreviewRun never invokes RemotePreviewRun itself, I can adapt it if
 desired.

 The part of the message above that I haven't addressed is the possibility
 that a remote backend is attempting to update the preview and fails (it
 will have localOnly set, so won't fall back to RemotePreviewRun).  Doing
 so would require changing the definition of the localOnly argument, and
 then verifying that the backend that invoked us isn't the backend that
 recorded the show.  Of course, if the backend that recorded the show fails
 to update the .png, there are probably bigger issues...  :-)

 danielk is the only one who has touched previewgenerator.cpp, so assigning
 to him.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/1585>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list