[claws-mail-cvs-commit] main.c

Colin Leroy <[email protected]> Wed, 16 Sep 2009 16:32:34 +0000
Newsgroups gmane.mail.sylpheed.claws.cvs
Message-ID <[email protected]>
Update of /srv/cvs/claws-mail/claws/src
In directory ran:/tmp/cvs-serv1498/src

Modified Files:
      Tag: gtk2
	main.c 
Log Message:
2009-09-16 [colin]	3.7.2cvs34

	* src/main.c
		Go grab files in /etc/skel if they exist
		at first startup 

Index: main.c
===================================================================
RCS file: /srv/cvs/claws-mail/claws/src/main.c,v
retrieving revision 1.115.2.222
retrieving revision 1.115.2.223
diff -u -d -r1.115.2.222 -r1.115.2.223
--- main.c	20 Aug 2009 21:03:15 -0000	1.115.2.222
+++ main.c	16 Sep 2009 16:32:32 -0000	1.115.2.223
@@ -1228,12 +1228,20 @@
 		/* If migration failed or the user didn't want to do it,
 		 * we create a new one (and we'll hit wizard later). 
 		 */
-		if (r == FALSE && !is_dir_exist(RC_DIR) && make_dir(RC_DIR) < 0) {
+		if (r == FALSE && !is_dir_exist(RC_DIR)) {
+#ifdef G_OS_UNIX
+			if (copy_dir(SYSCONFDIR "/skel/.claws-mail", RC_DIR) < 0) {
+#endif
+				if (!is_dir_exist(RC_DIR) && make_dir(RC_DIR) < 0) {
 #ifdef G_OS_WIN32
-			win32_close_log();
+					win32_close_log();
 #endif
-			exit(1);
-	}
+					exit(1);
+				}
+#ifdef G_OS_UNIX
+			}
+#endif
+		}
 	}