diff -ru gnomebaker-0.5.1/src/gbcommon.c gnomebaker-0.5.1.jd/src/gbcommon.c
--- gnomebaker-0.5.1/src/gbcommon.c	2006-02-03 23:28:02.000000000 +0100
+++ gnomebaker-0.5.1.jd/src/gbcommon.c	2006-06-02 16:52:44.000000000 +0200
@@ -111,10 +111,10 @@
 			gchar* fullname = g_build_filename(dirname, name, NULL);
 	
 			GB_DECLARE_STRUCT(struct stat, s);
-			if(stat(fullname, &s) == 0)
+			if(lstat(fullname, &s) == 0)
 			{
 				/* see if the name is actually a directory or a regular file */
-				if(s.st_mode & S_IFDIR)
+				if(S_ISDIR(s.st_mode))
 					size += gbcommon_calc_dir_size(fullname);
 				else if(s.st_mode & S_IFREG)
 					size += (guint64)s.st_size;
