device: Avoid clearing storage when we can garbage collect

If the device supports listing prints, then we can do more targeted
deletes once the storage runs out. As such, do not try to clear the
storage on first enroll (therefore allowing dual boot setups to work to
a limited degree).
This commit is contained in:
Benjamin Berg
2021-05-14 17:54:50 +02:00
parent f44233461f
commit 7f2b5fe7ff
2 changed files with 7 additions and 11 deletions

View File

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