comparison src/ui_fileops.c @ 702:e07895754e65

Drop concat_dir_and_file() and use g_build_filename() instead.
author zas_
date Tue, 20 May 2008 22:09:04 +0000
parents 28af4b6dd9ef
children 911e3769b60c
comparison
equal deleted inserted replaced
701:28af4b6dd9ef 702:e07895754e65
616 if (n <= 0) n++; 616 if (n <= 0) n++;
617 617
618 return g_strndup(path, (gsize) n); 618 return g_strndup(path, (gsize) n);
619 } 619 }
620 620
621 gchar *concat_dir_and_file(const gchar *base, const gchar *name)
622 {
623 if (!base || !name) return NULL;
624
625 if (strcmp(base, "/") == 0) return g_strconcat(base, name, NULL);
626
627 return g_strconcat(base, "/", name, NULL);
628 }
629
630 const gchar *extension_from_path(const gchar *path) 621 const gchar *extension_from_path(const gchar *path)
631 { 622 {
632 if (!path) return NULL; 623 if (!path) return NULL;
633 return strrchr(path, '.'); 624 return strrchr(path, '.');
634 } 625 }