| 2376 | } |
| 2377 | |
| 2378 | static gchar* |
| 2379 | get_file_label(const gchar *filename) |
| 2380 | { |
| 2381 | gchar *base, *pos, *end; |
| 2382 | |
| 2383 | base = g_path_get_basename(filename); |
| 2384 | pos = strrchr(base, '.'); |
| 2385 | if (pos != NULL) |
| 2386 | { |
| 2387 | // If the last '.' is within 4 chars of end of name, assume |
| 2388 | // there is an extension we want to strip. |
| 2389 | end = &base[strlen(base) - 1]; |
| 2390 | if (end - pos <= 4) |
| 2391 | *pos = 0; |
| 2392 | } |
| 2393 | return base; |
| 2394 | } |
| 2395 | |
| 2396 | gchar* |
| 2397 | ghb_create_volume_label(const hb_title_t * title) |
no outgoing calls
no test coverage detected