Changeset 5162


Ignore:
Timestamp:
Feb 28, 2008, 4:38:48 PM (14 years ago)
Author:
charles
Message:

make tr_mkdir() handle windows root directory paths like "C:"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils.c

    r5112 r5162  
    2424
    2525#include <assert.h>
     26#include <ctype.h> /* isalpha */
    2627#include <errno.h>
    2728#include <stdarg.h>
     
    196197    FILE * fp;
    197198
    198     assert( NULL != messageLock );
    199     tr_lockLock( messageLock );
     199    if( messageLock )
     200        tr_lockLock( messageLock );
    200201
    201202    fp = tr_getLog( );
     
    244245    }
    245246
    246     tr_lockUnlock( messageLock );
     247    if( messageLock )
     248        tr_lockUnlock( messageLock );
    247249}
    248250
     
    408410{
    409411#ifdef WIN32
     412    if( path && isalpha(path[0]) && path[1]==':' && !path[2] )
     413        return 0;
    410414    return mkdir( path );
    411415#else
Note: See TracChangeset for help on using the changeset viewer.