--- gnome-vfs.org/ChangeLog	2007-03-22 10:41:31.075996000 +0530
+++ gnome-vfs/ChangeLog	2007-03-22 18:00:08.875878000 +0530
@@ -1,3 +1,9 @@
+2007-03-22 Manjunath Kadajji <manjunath.kadajji@wipro.com>
+
+	* libgnomevfs/gnome-vfs-parse-ls.c: (is_year), (vfs_parse_filedate):
+	Parsing the file/folder named like "2002 filename" for ftp locations.
+	Fixes the bug #350052.	
+
 2007-03-19  Alexander Larsson  <alexl@redhat.com>
 
 	* configure.in:
--- gnome-vfs.org/libgnomevfs/gnome-vfs-parse-ls.c	2007-03-22 10:41:10.857081000 +0530
+++ gnome-vfs/libgnomevfs/gnome-vfs-parse-ls.c	2007-03-22 12:03:56.828319000 +0530
@@ -43,6 +43,7 @@
 #include <sys/types.h>
 #include <time.h>
 #include <unistd.h>
+#include <ctype.h>
 
 #ifndef TUNMLEN 
 #define TUNMLEN 256
@@ -199,10 +200,13 @@ is_time (const char *str, struct tm *tim
 	return 1;
 }
 
-static int is_year (const char *str, struct tm *tim)
+static int is_year (const char *str, struct tm *tim, const char *carbon, int column_ptr[], int idx)
 {
 	long year;
 
+	const char *p;
+	int count = 0;
+
 	if (strchr (str,':'))
 		return 0;
 
@@ -215,6 +219,14 @@ static int is_year (const char *str, str
 	if (year < 1900 || year > 3000)
 		return 0;
 
+	p = carbon + column_ptr[idx -1];
+	
+	while (*(p + count) != ' ')
+		count++;
+
+	if (!((*(p+count) == ' ') && (*(p+1+count) == ' ') && (isdigit (*(p+2+count)))))
+		return 0;
+
 	tim->tm_year = (int) (year - 1900);
 
 	return 1;
@@ -461,7 +473,7 @@ vfs_parse_filedate (int idx,
 
 	if (is_num (columns[idx])) {
 		if ((got_time = is_time (columns[idx], &tim)) ||
-		    (got_year = is_year (columns[idx], &tim))) {
+		    (got_year = is_year (columns[idx], &tim, carbon, column_ptr, idx))) {
 			idx++;
 
 			/* This is a special case for ctime () or Mon DD YYYY hh:mm */
@@ -470,7 +482,7 @@ vfs_parse_filedate (int idx,
 										      where the first line provides a year-like
 										      filename but no year, or a time-like filename
 										      but no time */
-			    ((!got_year && (got_year = is_year (columns[idx], &tim))) ||
+			    ((!got_year && (got_year = is_year (columns[idx], &tim, carbon, column_ptr, idx))) ||
 			     (!got_time && (got_time = is_time (columns[idx], &tim)))))
 				idx++; /* time & year or reverse */
 		} /* only time or date */
