Changeset 6154


Ignore:
Timestamp:
Jun 11, 2008, 11:40:27 PM (13 years ago)
Author:
charles
Message:

tr_ctorSetDownloadDir(): handle NULL download dirs more gracefully.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent-ctor.c

    r5922 r6154  
    208208{
    209209    struct optional_args * args = &ctor->optionalArgs[mode];
    210     args->isSet_downloadDir = 1;
    211     tr_strlcpy( args->downloadDir, directory, sizeof( args->downloadDir ) );
     210    if( directory ) {
     211        args->isSet_downloadDir = 1;
     212        tr_strlcpy( args->downloadDir, directory, sizeof( args->downloadDir ) );
     213    } else {
     214        args->isSet_downloadDir = 0;
     215        *args->downloadDir = '\0';
     216    }
    212217}
    213218
Note: See TracChangeset for help on using the changeset viewer.