~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Martin Pool
  • Date: 2010-02-02 23:02:18 UTC
  • mfrom: (4634.128.21 apport)
  • mto: This revision was merged to the branch mainline in revision 5002.
  • Revision ID: mbp@sourcefrog.net-20100202230218-waoht8l49b3bad2o
Send crash reports through apport, rather than just dumping files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2007, 2008 Canonical Ltd
 
1
# Copyright (C) 2005, 2007, 2008, 2010 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 in the XDG cache directory.
 
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.
870
872
    """
871
873
    if sys.platform == 'win32':
872
874
        return osutils.pathjoin(config_dir(), 'Crash')
873
875
    else:
874
 
        return osutils.pathjoin(xdg_cache_dir(), 'crash')
 
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')
875
879
 
876
880
 
877
881
def xdg_cache_dir():