~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2007, 2008 Canonical Ltd
2
2
#   Authors: Robert Collins <robert.collins@canonical.com>
3
3
#            and others
4
4
#
866
866
 
867
867
    This doesn't implicitly create it.
868
868
 
869
 
    On Windows it's in the config directory; elsewhere it's /var/crash
870
 
    which may be monitored by apport.  It can be overridden by
871
 
    $APPORT_CRASH_DIR.
 
869
    On Windows it's in the config directory; elsewhere in the XDG cache directory.
872
870
    """
873
871
    if sys.platform == 'win32':
874
872
        return osutils.pathjoin(config_dir(), 'Crash')
875
873
    else:
876
 
        # XXX: hardcoded in apport_python_hook.py; therefore here too -- mbp
877
 
        # 2010-01-31
878
 
        return os.environ.get('APPORT_CRASH_DIR', '/var/crash')
 
874
        return osutils.pathjoin(xdg_cache_dir(), 'crash')
879
875
 
880
876
 
881
877
def xdg_cache_dir():