1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-31 03:12:44 +00:00

tr_ctorSetDownloadDir(): handle NULL download dirs more gracefully.

This commit is contained in:
Charles Kerr 2008-06-11 23:40:27 +00:00
parent 9c649d7752
commit a029f4e34a

View file

@ -207,8 +207,13 @@ tr_ctorSetDownloadDir( tr_ctor * ctor,
const char * directory )
{
struct optional_args * args = &ctor->optionalArgs[mode];
if( directory ) {
args->isSet_downloadDir = 1;
tr_strlcpy( args->downloadDir, directory, sizeof( args->downloadDir ) );
} else {
args->isSet_downloadDir = 0;
*args->downloadDir = '\0';
}
}
int