~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Martin Pool
  • Date: 2010-01-31 12:01:47 UTC
  • mto: (4999.3.1 apport)
  • mto: This revision was merged to the branch mainline in revision 5002.
  • Revision ID: mbp@sourcefrog.net-20100131120147-awmv3fd991pbwlmk
Write crash files into /var/crash where apport can see them.

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
#
826
826
 
827
827
    This doesn't implicitly create it.
828
828
 
829
 
    On Windows it's in the config directory; elsewhere in the XDG cache directory.
 
829
    On Windows it's in the config directory; elsewhere it's /var/crash
 
830
    which may be monitored by apport.
830
831
    """
831
832
    if sys.platform == 'win32':
832
833
        return osutils.pathjoin(config_dir(), 'Crash')
833
834
    else:
834
 
        return osutils.pathjoin(xdg_cache_dir(), 'crash')
 
835
        # XXX: hardcoded in apport_python_hook.py; therefore here too -- mbp
 
836
        # 2010-01-31
 
837
        return '/var/crash'
835
838
 
836
839
 
837
840
def xdg_cache_dir():