From 4a779362b78bd7b62f728a5a13d48e76a3536692 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 2 Apr 2009 16:30:23 -0300 Subject: [PATCH] obexd: Fix showing symlinks as files. symlinks was not being shown as directory but they were when inside a directory as files. --- obexd/src/ftp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/obexd/src/ftp.c b/obexd/src/ftp.c index 413f1c474..4797df53c 100644 --- a/obexd/src/ftp.c +++ b/obexd/src/ftp.c @@ -76,7 +76,7 @@ static gchar *file_stat_line(gchar *filename, struct stat *fstat, struct stat *dstat) { gchar perm[51], atime[18], ctime[18], mtime[18]; - gchar *escaped, *ret; + gchar *escaped, *ret = NULL; snprintf(perm, 50, "user-perm=\"%s%s%s\" group-perm=\"%s%s%s\" " "other-perm=\"%s%s%s\"", @@ -99,7 +99,7 @@ static gchar *file_stat_line(gchar *filename, struct stat *fstat, if (S_ISDIR(fstat->st_mode)) ret = g_strdup_printf(FL_FOLDER_ELEMENT, escaped, perm, atime, mtime, ctime); - else + else if (S_ISREG(fstat->st_mode)) ret = g_strdup_printf(FL_FILE_ELEMENT, escaped, fstat->st_size, perm, atime, mtime, ctime); -- 2.47.3