Ticket #3532: previewgenerator.patch

File previewgenerator.patch, 1.0 KB (added by anonymous, 13 years ago)
  • mythtv/libs/libmythtv/previewgenerator.cpp

     
    6868
    6969    // Try to find a local means to access file...
    7070    QString localFN  = programInfo.GetPlaybackURL(false, true);
    71     if (!(localFN.left(1) == "/" && QFileInfo(localFN).exists()))
     71    QString localFNdir = QFileInfo(localFN).dirPath();
     72    if (!(localFN.left(1) == "/" &&
     73          QFileInfo(localFN).exists() &&
     74          QFileInfo(localFNdir).isWritable()))
    7275        return; // didn't find file locally, must use remote backend
    7376
    7477    // Found file locally, so set the new pathname..
     
    313316
    314317bool PreviewGenerator::IsLocal(void) const
    315318{
    316     return QFileInfo(pathname).exists();
     319    QString pathdir = QFileInfo(programInfo.pathname).dirPath();
     320    return (QFileInfo(pathname).exists() && QFileInfo(pathdir).isWritable());
    317321}
    318322
    319323/** \fn PreviewGenerator::SaveScreenshot()