Ticket #4284: mythmedia-fix.diff
File mythmedia-fix.diff, 1.1 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 VERBOSE(VB_IMPORTANT, LOC_ERR + "readlink() failed: " + ENO);353 VERBOSE(VB_IMPORTANT, LOC_ERR + "readlink() failed: " + DeviceName + ENO); 345 354 continue; 346 355 } 347 356 lpath[len] = 0;