Changeset d179921d for storage_xml.c


Ignore:
Timestamp:
2008-04-02T14:37:57Z (17 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
0a14b8c
Parents:
f9dbc99 (diff), 5f5d433 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge removal of access().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • storage_xml.c

    rf9dbc99 rd179921d  
    2929#include "arc.h"
    3030#include "md5.h"
     31#include <glib/gstdio.h>
    3132
    3233typedef enum
     
    243244static void xml_init( void )
    244245{
    245         if( access( global.conf->configdir, F_OK ) != 0 )
     246        if( ! g_file_test( global.conf->configdir, G_FILE_TEST_EXISTS ) )
    246247                log_message( LOGLVL_WARNING, "The configuration directory `%s' does not exist. Configuration won't be saved.", global.conf->configdir );
    247         else if( access( global.conf->configdir, R_OK ) != 0 || access( global.conf->configdir, W_OK ) != 0 )
     248        else if( ! g_file_test( global.conf->configdir, G_FILE_TEST_EXISTS ) || g_access( global.conf->configdir, W_OK ) != 0 )
    248249                log_message( LOGLVL_WARNING, "Permission problem: Can't read/write from/to `%s'.", global.conf->configdir );
    249250}
     
    372373        g_free( path2 );
    373374       
    374         if( !overwrite && access( path, F_OK ) != -1 )
     375        if( !overwrite && g_file_test( path, G_FILE_TEST_EXISTS ) )
    375376                return STORAGE_ALREADY_EXISTS;
    376377       
Note: See TracChangeset for help on using the changeset viewer.