Ticket #3522: mythtv-spaces_in_png_filenames.patch

File mythtv-spaces_in_png_filenames.patch, 813 bytes (added by sphery <mtdean@…>, 17 years ago)

Allows mainserver to find all PNG's--even those with spaces or semicolons in the filename

  • programs/mythbackend/mainserver.cpp

     
    15341534    /* Delete all preview thumbnails. */
    15351535
    15361536    QFileInfo fInfo( ds->filename );
    1537     QDir      dir  ( fInfo.dirPath(), fInfo.fileName() + "*.png" );
     1537    QString nameFilter = fInfo.fileName() + "*.png";
     1538    // QDir's nameFilter uses spaces or semicolons to separate globs,
     1539    // so replace them with the "match any character" wildcard
     1540    // since mythrename.pl may have included them in filenames
     1541    nameFilter.replace(QRegExp("( |;)"), "?");
     1542    QDir      dir  ( fInfo.dirPath(), nameFilter );
    15381543
    15391544    for (uint nIdx = 0; nIdx < dir.count(); nIdx++)
    15401545    {