[shotwell/shotwell-0.30] Camera: Fix import from camera



commit 7cf552928a1e587c009c2de6097e563d0d0abcf2
Author: Jens Georg <mail jensge org>
Date:   Sat May 29 11:04:45 2021 +0200

    Camera: Fix import from camera
    
    The teneray operator seems to generate invalid code which corrupts the
    basedir, leading to either no thumbnails nor no files at all
    
    Fixes #4927

 src/camera/ImportPage.vala | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala
index 5aab9b30..3a252c47 100644
--- a/src/camera/ImportPage.vala
+++ b/src/camera/ImportPage.vala
@@ -1361,8 +1361,12 @@ public class ImportPage : CheckerboardPage {
         
         if (fsid >= sifs.length)
             return null;
-        
-        return (sifs[fsid].fields & GPhoto.CameraStorageInfoFields.BASE) != 0 ? (string)sifs[fsid].basedir : 
"/";
+
+        if (GPhoto.CameraStorageInfoFields.BASE in sifs[fsid].fields) {
+            return (string) sifs[fsid].basedir;
+        } else {
+            return "/";
+        }
     }
     
     public static string? get_fulldir(GPhoto.Camera camera, string camera_name, int fsid, string folder) {


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