~alobbs/+junk/libaccounts-glib

Viewing all changes in revision 109.

  • Committer: Alberto Mardegan
  • Author(s): Will Thompson
  • Date: 2011-02-10 07:32:46 UTC
  • Revision ID: git-v1:99f45f251e479cfdbb4f32838048af37fc1a1bee
Tags: 0.64
ag-tool: use g_path_get_basename(), not basename()

On my amd64 machine, the current ag-tool crashes when it tries to show
the usage string. gdb shows that gl_app_name contains garbage, though it
seemed to not be garbage before the call to show_help(). (Yes, this
surprised me too.) I suspect it might be related to basename modifying
its argument or something; I'm not really sure.

Either way, replacing the call to basename() with a call to
g_path_get_basename()—which returns a newly allocated string—fixes the
crash.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: