Changeset 8847


Ignore:
Timestamp:
Jul 22, 2009, 8:39:12 PM (13 years ago)
Author:
charles
Message:

(trunk gtk) minor tweak: replace mkdir_p() with gtr_mkdir_with_parents() for symmetry with glib

Location:
trunk/gtk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/conf.c

    r8673 r8847  
    5858    gl_confdir = g_strdup( configDir );
    5959
    60     if( mkdir_p( gl_confdir, 0755 ) )
     60    if( gtr_mkdir_with_parents( gl_confdir, 0755 ) )
    6161        return TRUE;
    6262
  • trunk/gtk/main.c

    r8846 r8847  
    439439        /* ensure the directories are created */
    440440       if(( str = pref_string_get( PREF_KEY_DIR_WATCH )))
    441            mkdir_p( str, 0777 );
     441           gtr_mkdir_with_parents( str, 0777 );
    442442       if(( str = pref_string_get( TR_PREFS_KEY_DOWNLOAD_DIR )))
    443            mkdir_p( str, 0777 );
     443           gtr_mkdir_with_parents( str, 0777 );
    444444
    445445        /* initialize the libtransmission session */
  • trunk/gtk/util.c

    r8846 r8847  
    88 * the Transmission project.
    99 *
    10  * $Id:$
     10 * $Id$
    1111 */
    1212
     
    198198
    199199int
    200 mkdir_p( const char * path,
    201          mode_t       mode )
     200gtr_mkdir_with_parents( const char * path, int mode )
    202201{
    203202#if GLIB_CHECK_VERSION( 2, 8, 0 )
  • trunk/gtk/util.h

    r8846 r8847  
    88 * the Transmission project.
    99 *
    10  * $Id:$
     10 * $Id$
    1111 */
    1212
     
    3838/* similar to asctime, but is utf8-clean */
    3939char* gtr_localtime2( char * buf, time_t time, size_t buflen );
    40 
    41 /* create a directory and any missing parent directories */
    42 int mkdir_p( const char *name, mode_t mode );
    4340
    4441/***
     
    7976/* GTK-related utilities */
    8077#ifdef GTK_MAJOR_VERSION
     78
     79/* backwards-compatible wrapper around g_mkdir_with_parents() */
     80int gtr_mkdir_with_parents( const char *name, int mode );
    8181
    8282/* backwards-compatible wrapper around gdk_threads_add_timeout_seconds() */
Note: See TracChangeset for help on using the changeset viewer.