mirror of
https://github.com/transmission/transmission.git
synced 2025-12-25 04:45:56 +00:00
test: add platform tests (#3514)
* test: add tr_getDefaultDownloadDir() tests this also indirectly tests xdg and homedir * test: add PlatformTest.defaultConfigDirEnv * test: add PlatformTest.defaultConfigDirXdgConfig test: add PlatformTest.defaultConfigDirXdgConfigHome * test: add PlatformTest.webClientDirEnvClutch test: add PlatformTest.webClientDirEnvTr test: add PlatformTest.webClientDirXdgDataHome * fixup! test: add PlatformTest.webClientDirEnvClutch fix: win32 breakage
This commit is contained in:
@@ -94,9 +94,11 @@ int main(int argc, char** argv)
|
||||
tr_formatter_speed_init(speed_K, _(speed_K_str), _(speed_M_str), _(speed_G_str), _(speed_T_str));
|
||||
|
||||
/* set up the config dir */
|
||||
if (config_dir.empty())
|
||||
if (std::empty(config_dir))
|
||||
{
|
||||
config_dir = tr_getDefaultConfigDir(AppConfigDirName);
|
||||
auto* const default_config_dir = tr_getDefaultConfigDir(AppConfigDirName);
|
||||
config_dir = default_config_dir;
|
||||
tr_free(default_config_dir);
|
||||
}
|
||||
|
||||
gtr_pref_init(config_dir);
|
||||
|
||||
Reference in New Issue
Block a user