Ticket #4284: mythmedia-fix.diff

File mythmedia-fix.diff, 1.1 KB (added by Markus Schulz <msc@…>, 16 years ago)
  • 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            {
    344                 VERBOSE(VB_IMPORTANT, LOC_ERR + "readlink() failed: " + ENO);
     353                VERBOSE(VB_IMPORTANT, LOC_ERR + "readlink() failed: " + DeviceName + ENO);
    345354                continue;
    346355            }
    347356            lpath[len] = 0;