Skip to main content
johnrellis
Legend
November 6, 2022

P: SDK: folder:getPhotos() fails on device folders created by cloud sync

  • November 6, 2022
  • 1 reply
  • 1415 views

The method folder:getPhotos() always returns the empty array on device folders created by cloud sync.  To reproduce:

 

1. Install this script as "lrmobile-folder-bug.lua" in the Scripts folder and restart LR:

 

local LrDialogs = import "LrDialogs"
local LrTasks = import "LrTasks"
local catalog = import "LrApplication".activeCatalog ()
LrTasks.startAsyncTask (function ()
    local folder = catalog:getActiveSources ()[1]
    LrDialogs.message (string.format ("%d photos in %s", 
        #folder:getPhotos (), folder:getPath ()))
    end)

 

 

2. In the Folder panel, select a device folder created by cloud sync.

 

3. Do the menu command Scripts > lrmobile-folder-bug.lua and observe this output:

 

Tested on LR 12.0.1 / Mac OS 12.6.1.

 

 

This topic has been closed for replies.

1 reply

Rikk Flohr_Photography
Community Manager
November 7, 2022

Assign bug number

Rikk Flohr: Adobe Photography Org