Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 82585

Working around bogus top-level folders in catalog

$
0
0

I have a catalog originally created on Mac and then moved to Windows, and it has two poison top-level folders that cause various SDK methods to fail.  For example, they cause catalog:setActiveSources({folder}) to have an assertion failure. 

 

For one of the folders, folder:getPath() returns nil. For another of the folders, folder:getPath() returns a Windows UNC file path that doesn't exist. I discovered this heuristic for identifying these bogus folders:

 

function isValidTopLevelFolder (folder)    local success, f = LrTasks.pcall (function ()        return catalog:getFolderByPath (folder:getPath ()) end)    return success and f    end

 

I've already provided this catalog to Becky Sowada of Adobe, following up on a bug report in the feedback forum. But I thought this work-around might be of usefulness to others someday.


Viewing all articles
Browse latest Browse all 82585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>