Show
Ignore:
Timestamp:
09/06/07 14:05:03 (3 years ago)
Author:
tal
Message:
Handle overlapping directories found in multiple script directories.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • applicationScripts/FontLab/ScriptBrowser.py

    r7 r8  
    6767    if isinstance(path, list): 
    6868        for p in path: 
    69             sections.update(runScriptDirectory(p)) 
     69            for section, scripts in runScriptDirectory(p).items(): 
     70                if section not in sections: 
     71                    sections[section] = {} 
     72                sections[section].update(scripts) 
    7073    else: 
    7174        for fileName in os.listdir(path): 
     
    7477            fullPath = os.path.join(path, fileName) 
    7578            if os.path.isdir(fullPath): 
    76                 sections[fileName] = runSubDirectory(fullPath) 
     79                found = runSubDirectory(fullPath) 
     80                if fileName in sections: 
     81                    sections[fileName].extend(found) 
     82                else: 
     83                    sections[fileName] = found 
    7784    return sections 
    7885