[files] [cleanup/redesign] removed the old file_list structure and also added file listing in setup
diff --git a/patches/april_2013/p06_update_file_size.py b/patches/april_2013/p06_update_file_size.py
index e61c060..8709c7b 100644
--- a/patches/april_2013/p06_update_file_size.py
+++ b/patches/april_2013/p06_update_file_size.py
@@ -4,8 +4,9 @@
 	files_path = webnotes.utils.get_path("public", "files")
 	for f in webnotes.conn.sql("""select name, file_name from 
 		`tabFile Data`""", as_dict=True):
-		filepath = os.path.join(files_path, f.file_name)
-		if os.path.exists(filepath):
-			webnotes.conn.set_value("File Data", f.name, "file_size", os.stat(filepath).st_size)
+		if f.file_name:
+			filepath = os.path.join(files_path, f.file_name)
+			if os.path.exists(filepath):
+				webnotes.conn.set_value("File Data", f.name, "file_size", os.stat(filepath).st_size)
 			
 		
\ No newline at end of file