mirror of
https://github.com/transmission/transmission
synced 2024-12-24 16:52:39 +00:00
(cli) #5212 'cli fails when download directory doesn't exist' -- fix 2.76 regression introduced in r13764 (trunk) / r13772 (branches/2.7x)
This commit is contained in:
parent
d4242140be
commit
4de4322b2c
1 changed files with 7 additions and 9 deletions
16
cli/cli.c
16
cli/cli.c
|
@ -267,16 +267,14 @@ main (int argc, char ** argv)
|
|||
if (tr_variantDictFindStr (&settings, TR_KEY_download_dir, &str, NULL))
|
||||
{
|
||||
if (!tr_fileExists (str, NULL))
|
||||
tr_mkdirp (str, 0700);
|
||||
{
|
||||
tr_mkdirp (str, 0700);
|
||||
|
||||
if (tr_fileExists (str, NULL))
|
||||
{
|
||||
tr_variantDictAddStr (&settings, TR_KEY_download_dir, str);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf (stderr, "Unable to create download directory \"%s\"!\n", str);
|
||||
return EXIT_FAILURE;
|
||||
if (!tr_fileExists (str, NULL))
|
||||
{
|
||||
fprintf (stderr, "Unable to create download directory \"%s\"!\n", str);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue