|
Link Here
|
| 255 |
int i; |
255 |
int i; |
| 256 |
tmp_folder_name = tmp->path + strlen(Maildir); |
256 |
tmp_folder_name = tmp->path + strlen(Maildir); |
| 257 |
for (i = 0; i < strlen(tmp->path) - strlen(Maildir); i++) { |
257 |
for (i = 0; i < strlen(tmp->path) - strlen(Maildir); i++) { |
| 258 |
if (tmp_folder_name[i] == '/') sidebar_folder_depth++; |
258 |
if (tmp_folder_name[i] == '/' || tmp_folder_name[i] == '.') sidebar_folder_depth++; |
| 259 |
} |
259 |
} |
| 260 |
if (sidebar_folder_depth > 0) { |
260 |
if (sidebar_folder_depth > 0) { |
| 261 |
sidebar_folder_name = malloc(strlen(basename(tmp->path)) + sidebar_folder_depth + 1); |
261 |
if (option(OPTSIDEBARSHORTPATH)) { |
|
|
262 |
tmp_folder_name = strrchr(tmp->path, '.'); |
| 263 |
if (tmp_folder_name == NULL) |
| 264 |
tmp_folder_name = tmp->path; |
| 265 |
else |
| 266 |
tmp_folder_name++; |
| 267 |
} |
| 268 |
else |
| 269 |
tmp_folder_name = tmp->path; |
| 270 |
sidebar_folder_name = malloc(strlen(basename(tmp_folder_name)) + sidebar_folder_depth + 1); |
| 262 |
for (i=0; i < sidebar_folder_depth; i++) |
271 |
for (i=0; i < sidebar_folder_depth; i++) |
| 263 |
sidebar_folder_name[i]=' '; |
272 |
sidebar_folder_name[i]=' '; |
| 264 |
sidebar_folder_name[i]=0; |
273 |
sidebar_folder_name[i]=0; |
| 265 |
strncat(sidebar_folder_name, basename(tmp->path), strlen(basename(tmp->path)) + sidebar_folder_depth); |
274 |
strncat(sidebar_folder_name, basename(tmp_folder_name), strlen(basename(tmp_folder_name)) + sidebar_folder_depth); |
| 266 |
} |
275 |
} |
| 267 |
} |
276 |
} |
| 268 |
printw( "%.*s", SidebarWidth - delim_len + 1, |
277 |
printw( "%.*s", SidebarWidth - delim_len + 1, |