Thanks charles. I still see the same behaviour with the second patch though. I've done some debugging, and what seems to be happening is that the correct setting is overwritten later on after returning from tr_prefs_init_defaults. In tr_sessionLoadSettings, tr_sessionGetDefaultSettings is called which unconditionally overwrites the (correct) default download directory with the return value of tr_getDefaultDownloadDir (~/Downloads).
I commented out the call to tr_sessionGetDefaultSettings, rebuilt it, and it seems to work as expected.
Thanks charles. I still see the same behaviour with the second patch though. I've done some debugging, and what seems to be happening is that the correct setting is overwritten later on after returning from tr_prefs_ init_defaults. In tr_sessionLoadS ettings, tr_sessionGetDe faultSettings is called which unconditionally overwrites the (correct) default download directory with the return value of tr_getDefaultDo wnloadDir (~/Downloads).
I commented out the call to tr_sessionGetDe faultSettings, rebuilt it, and it seems to work as expected.