Filewatch: do not try to watch empty paths.
In slotDeviceMounted, we find the mountPath to watch using entry->MountPath. However, if the removable device could not be viewed as a Solid::DeviceType::StorageAccess, mountPath returns QString(). We would then try to watch an empty folder. In shouldFolderBeWatched we would try to split the empty string, resulting in an empty list, and take the last component of this list, leading to an invalid pointer and a crash. The fix is two-fold: First, check for empty mountPath in slotDeviceMounted and do not try to watch it. Second, check that the split path is not empty in shouldFolderBeWatched before taking the last component. BUG: 312423 FIXED-IN: 4.10.1 REVIEW: 108985
parent
fe79c33a
Please register or sign in to comment