Bläddra i källkod

[image] Avoid ending up with multiple selected images on re-registration

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 år sedan
förälder
incheckning
4562223420
1 ändrade filer med 6 tillägg och 0 borttagningar
  1. 6
    0
      src/core/image.c

+ 6
- 0
src/core/image.c Visa fil

@@ -128,6 +128,12 @@ int register_image ( struct image *image ) {
128 128
 			   imgindex++ );
129 129
 	}
130 130
 
131
+	/* Avoid ending up with multiple "selected" images on
132
+	 * re-registration
133
+	 */
134
+	if ( image_find_selected() )
135
+		image->flags &= ~IMAGE_SELECTED;
136
+
131 137
 	/* Add to image list */
132 138
 	image_get ( image );
133 139
 	image->flags |= IMAGE_REGISTERED;

Laddar…
Avbryt
Spara