[shotwell] Fix iteration of storage informations



commit 7f3eca0fc593e45f9479f8fd5ffe6f032ecdeb6b
Author: Jens Georg <mail jensge org>
Date:   Sun Mar 14 12:58:40 2021 +0100

    Fix iteration of storage informations

 src/camera/ImportPage.vala | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala
index 63839ad7..375e5cb0 100644
--- a/src/camera/ImportPage.vala
+++ b/src/camera/ImportPage.vala
@@ -1182,7 +1182,7 @@ public class ImportPage : CheckerboardPage {
         GPhoto.CameraStorageInformation[] sifs = null;
         refresh_result = dcamera.gcamera.get_storageinfo(out sifs, spin_idle_context.context);
         if (refresh_result == GPhoto.Result.OK) {
-            for (int fsid = 0; fsid < count; fsid++) {
+            for (int fsid = 0; fsid < sifs.length; fsid++) {
                 // Check well-known video and image paths first to prevent accidental
                 // scanning of undesired directories (which can cause user annoyance with
                 // some smartphones or camera-equipped media players)
@@ -1324,7 +1324,6 @@ public class ImportPage : CheckerboardPage {
     // between each mount
     public static string? get_fs_basedir(GPhoto.Camera camera, int fsid) {
         GPhoto.CameraStorageInformation[] sifs = null;
-        int count = 0;
         GPhoto.Result res = camera.get_storageinfo(out sifs, null_context.context);
         if (res != GPhoto.Result.OK)
             return null;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]