| 760 | } |
| 761 | |
| 762 | G_GNUC_STRFTIME(1) static char* |
| 763 | get_creation_date(const char *pattern, const char *metaValue, const char *file) |
| 764 | { |
| 765 | char date[11] = ""; |
| 766 | if (metaValue != NULL && strlen(metaValue) > 1) |
| 767 | { |
| 768 | struct tm tm; |
| 769 | if (parse_datestring(metaValue, &tm)) |
| 770 | { |
| 771 | strftime(date, 11, pattern, &tm); |
| 772 | } |
| 773 | } |
| 774 | else |
| 775 | { |
| 776 | GStatBuf stbuf; |
| 777 | if (g_stat(file, &stbuf) == 0){ |
| 778 | struct tm *tm; |
| 779 | tm = localtime(&(stbuf.st_mtime)); |
| 780 | strftime(date, 11, pattern, tm); |
| 781 | } |
| 782 | } |
| 783 | return strdup(date); |
| 784 | } |
| 785 | |
| 786 | static void |
| 787 | make_unique_dest(const gchar *dest_dir, GString *str, const gchar * extension) |
no test coverage detected