[shotwell/shotwell-0.30] Fix import from camera, again



commit 5870a7edea191c292e9649c0cd930e42c53ccaff
Author: Jens Georg <mail jensge org>
Date:   Wed Aug 18 11:11:29 2021 +0200

    Fix import from camera, again
    
    Fixes #4927 for stable branch

 src/camera/ImportPage.vala | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala
index 3a252c47..1e50777f 100644
--- a/src/camera/ImportPage.vala
+++ b/src/camera/ImportPage.vala
@@ -1209,10 +1209,9 @@ public class ImportPage : CheckerboardPage {
         Gee.ArrayList<ImportSource> import_list = new Gee.ArrayList<ImportSource>();
         
         GPhoto.CameraStorageInformation[] sifs = null;
-        int count = 0;
         refresh_result = camera.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)
@@ -1354,7 +1353,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]