Changeset 13764
- Timestamp:
- Jan 4, 2013, 11:58:52 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cli/cli.c
r13683 r13764 232 232 size_t fileLength; 233 233 const char * str; 234 char buf[TR_PATH_MAX];235 234 236 235 tr_formatter_mem_init (MEM_K, MEM_K_STR, MEM_M_STR, MEM_G_STR, MEM_T_STR); … … 268 267 if (tr_variantDictFindStr (&settings, TR_KEY_download_dir, &str, NULL)) 269 268 { 270 str = tr_realpath (str, buf); 271 272 if (str != NULL) 269 if (!tr_fileExists (str, NULL)) 270 tr_mkdirp (str, 0700); 271 272 if (tr_fileExists (str, NULL)) 273 273 { 274 274 tr_variantDictAddStr (&settings, TR_KEY_download_dir, str); … … 276 276 else 277 277 { 278 fprintf (stderr, " Download directory does not exist!\n");278 fprintf (stderr, "Unable to create download directory \"%s\"!\n", str); 279 279 return EXIT_FAILURE; 280 280 }
Note: See TracChangeset
for help on using the changeset viewer.