Permalink
Browse files

Fix bluray playback if mounting path is a symbolic link

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 93d3631223b4d3a2c8bcfb3b503deab67ab4dfc7
Showing with 10 additions and 0 deletions.
  1. +10 −0 mythtv/libs/libmythtv/bdringbuffer.cpp
@@ -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()));

0 comments on commit 93d3631

Please sign in to comment.