Ticket #4284: mythmedia-fix2.diff
File mythmedia-fix2.diff, 1.4 KB (added by , 16 years ago) |
---|
-
libs/libmyth/mythmedia.cpp
328 328 { 329 329 QString MountPoint; 330 330 QString DeviceName; 331 struct stat fileStat; 332 331 333 332 334 // Extract the mount point and device name. 333 335 stream >> DeviceName >> MountPoint; … … 337 339 // Skip the rest of the line 338 340 line = stream.readLine(); 339 341 342 343 if(lstat(DeviceName.local8Bit(), &fileStat) != 0) 344 continue; 345 //no symlink 346 if(!S_ISLNK(fileStat.st_mode)) 347 continue; 348 340 349 // Now lets see if we're mounted... 341 350 ssize_t len = readlink(DeviceName.local8Bit(), lpath, PATH_MAX); 342 351 if (len < 0) 343 352 { 344 353 VERBOSE(VB_IMPORTANT, QString("%1 readlink() failed for %2: %3") 345 354 .arg(LOC_ERR) 346 .arg(DeviceName.local8Bit()) );347 .arg(ENO) ;355 .arg(DeviceName.local8Bit()) 356 .arg(ENO)); 348 357 continue; 349 358 } 350 359 lpath[len] = 0;