1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-16 11:42:05 +01:00

Slightly modify the way CddaLister::Init worksr: as cdio_get_devices sometimes return only symlinks, we should not ignore them.

This commit is contained in:
Arnaud Bienner 2012-11-18 22:05:18 +01:00
parent 40f0994da4
commit fb07308607

View File

@ -108,8 +108,9 @@ void CddaLister::Init() {
for (; *devices != NULL; ++devices) {
QString device(*devices);
QFileInfo device_info(device);
if (device_info.isSymLink())
continue;
if (device_info.isSymLink()) {
device = device_info.symLinkTarget();
}
#ifdef Q_OS_DARWIN
// Every track is detected as a separate device on Darwin. The raw disk looks
// like /dev/rdisk1
@ -117,8 +118,10 @@ void CddaLister::Init() {
continue;
}
#endif
if (!devices_list_.contains(device)) {
devices_list_ << device;
emit DeviceAdded(device);
}
}
}