Changeset 2118:1999d85332aa for browser.c
Legend:
- Unmodified
- Added
- Removed
-
browser.c
r2103 r2118 35 35 #include <unistd.h> 36 36 #include <sys/stat.h> 37 #include <errno.h> 37 38 38 39 static struct mapping_t FolderHelp[] = { … … 344 345 345 346 static int examine_directory (MUTTMENU *menu, struct browser_state *state, 346 c onst char *d, const char *prefix)347 char *d, const char *prefix) 347 348 { 348 349 struct stat s; … … 352 353 BUFFY *tmp; 353 354 354 if (stat (d, &s) == -1) 355 { 355 while (stat (d, &s) == -1) 356 { 357 if (errno == ENOENT) 358 { 359 /* The last used directory is deleted, try to use the parent dir. */ 360 char *c = strrchr (d, '/'); 361 362 if (c && (c > d)) 363 { 364 *c = 0; 365 continue; 366 } 367 } 356 368 mutt_perror (d); 357 369 return (-1);
