Don't try to clear storage on devices without internal storage

This change prevents warnings like 'Failed to clear storage before first enrollment: Device has no storage.'.
This commit is contained in:
Julian 2022-05-01 00:29:09 +02:00
parent 0d2e2a6742
commit 3633dbaa63
No known key found for this signature in database
GPG key ID: ABE1CDEB9E44A6F3

View file

@ -2209,7 +2209,8 @@ fprint_device_enroll_start (FprintDBusDevice *dbus_dev,
priv->enroll_data = finger;
priv->current_action = ACTION_ENROLL;
if (!fp_device_has_feature (priv->dev, FP_DEVICE_FEATURE_STORAGE_LIST) &&
if (fp_device_has_feature (priv->dev, FP_DEVICE_FEATURE_STORAGE) &&
!fp_device_has_feature (priv->dev, FP_DEVICE_FEATURE_STORAGE_LIST) &&
is_first_enrollment (rdev))
{
g_autoptr(GError) clear_err = NULL;