Changeset 13793


Ignore:
Timestamp:
Jan 16, 2013, 12:21:02 AM (8 years ago)
Author:
jordan
Message:

(cli) #5212 'cli fails when download directory doesn't exist' -- fix 2.76 regression introduced in r13764 (trunk) / r13772 (branches/2.7x)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cli/cli.c

    r13764 r13793  
    268268    {
    269269      if (!tr_fileExists (str, NULL))
    270         tr_mkdirp (str, 0700);
    271 
    272       if (tr_fileExists (str, NULL))
    273270        {
    274           tr_variantDictAddStr (&settings, TR_KEY_download_dir, str);
    275         }
    276       else
    277         {
    278           fprintf (stderr, "Unable to create download directory \"%s\"!\n", str);
    279           return EXIT_FAILURE;
     271          tr_mkdirp (str, 0700);
     272
     273          if (!tr_fileExists (str, NULL))
     274            {
     275              fprintf (stderr, "Unable to create download directory \"%s\"!\n", str);
     276              return EXIT_FAILURE;
     277            }
    280278        }
    281279    }
Note: See TracChangeset for help on using the changeset viewer.