@@ -264,8 +264,8 @@ def getAllUFOPaths(self, flattenDesignSpace=True):
264264 if not items :
265265 items = table .getArrangedItems ()
266266 ufoPaths = []
267- for item in items :
268- path = item [ "source" ]
267+
268+ def extractPath ( path ):
269269 ext = os .path .splitext (path )[1 ].lower ()
270270 if ext == ".ufo" :
271271 dummyFont = defcon .Font (path )
@@ -274,8 +274,9 @@ def getAllUFOPaths(self, flattenDesignSpace=True):
274274 elif self .report is not None :
275275 self .report .write (f"'{ path } ' has no family name or style name" )
276276 elif os .path .isdir (path ):
277- for ext in self .supportedFontFileFormats :
278- ufoPaths .extend (walkDirectoryForFile (path , ext = ext ))
277+ for ext in self .supportedFileTypes :
278+ for subpath in walkDirectoryForFile (path , ext = ext ):
279+ extractPath (subpath )
279280 elif flattenDesignSpace and ext == ".designspace" :
280281 if "designspaceDocument" not in item :
281282 item ["designspaceDocument" ] = BatchEditorOperator (path )
@@ -286,6 +287,12 @@ def getAllUFOPaths(self, flattenDesignSpace=True):
286287 for instanceDescriptor in designspaceDocument .instances :
287288 if instanceDescriptor .path is not None :
288289 ufoPaths .append (instanceDescriptor .path )
290+ elif ext in self .supportedFileTypes :
291+ ufoPaths .append (path )
292+
293+ for item in items :
294+ extractPath (item ["source" ])
295+
289296 return ufoPaths
290297
291298 def getAllDesignspacePaths (self ):
0 commit comments