--- a/src/lxpaths.c Fri Jun 26 05:47:04 2009 +0000 +++ b/src/lxpaths.c Sun Jan 31 18:35:06 2010 +1000 @@ -120,12 +120,12 @@ gchar *get_filename_at( const gchar *at, const gchar *filename ) { char tmp[PATH_MAX]; - char *p = strrchr( filename, '/' ); + char *p = strrchr( at, '/' ); if( p == NULL ) { /* No path at all, so just return filename */ return g_strdup(filename); } else { - int off = p-filename; + int off = p-at; return g_strdup_printf("%.*s%c%s", off, at, G_DIR_SEPARATOR, filename ); } }