Ticket #4284: mythmedia-fix2.diff

File mythmedia-fix2.diff, 1.4 KB (added by Markus Schulz <msc@…>, 16 years ago)

fix the compile bug from r15079

  • libs/libmyth/mythmedia.cpp

     
    328328        {
    329329            QString MountPoint;
    330330            QString DeviceName;
     331            struct stat fileStat;
     332
    331333           
    332334            // Extract the mount point and device name.
    333335            stream >> DeviceName >> MountPoint;
     
    337339            // Skip the rest of the line
    338340            line = stream.readLine();
    339341           
     342
     343            if(lstat(DeviceName.local8Bit(), &fileStat) != 0)
     344              continue;
     345            //no symlink
     346            if(!S_ISLNK(fileStat.st_mode))
     347              continue;
     348
    340349            // Now lets see if we're mounted...
    341350            ssize_t len = readlink(DeviceName.local8Bit(), lpath, PATH_MAX);
    342351            if (len < 0)
    343352            {
    344353                VERBOSE(VB_IMPORTANT, QString("%1 readlink() failed for %2: %3")
    345354                                            .arg(LOC_ERR)
    346                                             .arg(DeviceName.local8Bit()));
    347                                             .arg(ENO);
     355                                            .arg(DeviceName.local8Bit())
     356                                            .arg(ENO));
    348357                continue;
    349358            }
    350359            lpath[len] = 0;