Changeset dde1b4d for global.c


Ignore:
Timestamp:
Jul 15, 2011, 11:40:47 PM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
c6332f5
Parents:
30d0cf7
git-author:
David Benjamin <davidben@mit.edu> (07/12/11 11:58:02)
git-committer:
David Benjamin <davidben@mit.edu> (07/15/11 23:40:47)
Message:
Use g_build_filename instead of g_strdup_printf to build paths

Saves us a duplicate slash in a few places, although most of the time it
doesn't do anything. Eh, may as well use it and be more explicit or
something.

Also change the one existing call to g_build_path to g_build_filename
instead. It's much less of a pain to use.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r16cf182d rdde1b4d  
    7777  g->confdir = NULL;
    7878  g->startupfile = NULL;
    79   cd = g_strdup_printf("%s/%s", g->homedir, OWL_CONFIG_DIR);
     79  cd = g_build_filename(g->homedir, OWL_CONFIG_DIR, NULL);
    8080  owl_global_set_confdir(g, cd);
    8181  g_free(cd);
     
    364364  g->confdir = g_strdup(cd);
    365365  g_free(g->startupfile);
    366   g->startupfile = g_strdup_printf("%s/startup", cd);
     366  g->startupfile = g_build_filename(cd, "startup", NULL);
    367367}
    368368
Note: See TracChangeset for help on using the changeset viewer.