]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cdrom.cc
apt-pkg/cdrom.cc: make cdrom.Mounted property reliable
[apt.git] / apt-pkg / cdrom.cc
index 087ee321ca7668391fa1ec41b70af71013ef48f0..517efa180c4cec3e5b9cafc82b7b4a4043e9832e 100644 (file)
@@ -908,7 +908,8 @@ pkgUdevCdromDevices::Scan()
       cdrom.DeviceName = string(devnode);
       if (mountpath) {
         cdrom.MountPath = mountpath;
-        cdrom.Mounted = true;
+        string s = string(mountpath);
+        cdrom.Mounted = IsMounted(s);
       } else {
         cdrom.Mounted = false;
         cdrom.MountPath = "";