Skip to content

Commit

Permalink
Fix bluray playback if mounting path is a symbolic link
Browse files Browse the repository at this point in the history
Some distributions (such as Ubuntu) symlink /media/cdrom0 to /media/cdrom. Decryption would fail if trying to play bd:/media/cdrom.
We know determine the actual canonical path

Fix #10340 (part 2)
  • Loading branch information
jyavenard committed Feb 22, 2012
1 parent 2fa00e7 commit 93d3631
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mythtv/libs/libmythtv/bdringbuffer.cpp
Expand Up @@ -275,6 +275,16 @@ bool BDRingBuffer::OpenFile(const QString &lfilename, uint retry_ms)
safefilename = lfilename;
filename = lfilename;

// clean path filename
QString filename = QDir(QDir::cleanPath(lfilename)).canonicalPath();
if (filename.isEmpty())
{
LOG(VB_GENERAL, LOG_ERR, LOC +
QString("%1 nonexistent").arg(lfilename));
filename = lfilename;
}
safefilename = filename;

LOG(VB_GENERAL, LOG_INFO, LOC + QString("Opened BDRingBuffer device at %1")
.arg(filename.toLatin1().data()));

Expand Down

0 comments on commit 93d3631

Please sign in to comment.