Hi,

This is from mailer/thunderbird.py:

_PORTABLECACHE = None

def getDefaultProfileDir():
    """Returns Thunderbird's default profile directory"""

    global _PORTABLECACHE

    path = getThunderbirdDir()

    # Thunderbird Portable does not have a profiles.ini file, only one
    # profile. And there's only one way to know where it
    # is... Hackish.

    if os.name == 'nt' and not os.path.exists(path):
        if _PORTABLECACHE is not None:
            return _PORTABLECACHE

        from taskcoachlib.thirdparty import wmi

        for process in wmi.WMI().Win32_Process():
            if 
process.ExecutablePath.lower().endswith('thunderbirdportable.exe'):
                _PORTABLEPATH =
os.path.join(os.path.split(process.ExecutablePath)[0], 'Data',
'profile')
                break
        else:
            raise RuntimeError, 'Could not find Thunderbird profile.'

        return _PORTABLECACHE




Note the _PORTABLEPATH variable. That should be _PORTABLECACHE, right?

Cheers, Frank

Reply via email to