>>>>> "Michael" == Michael Gerz <[EMAIL PROTECTED]> writes:

Michael> Hi, when running LyX 1.4.2svn, I get the following error
Michael> message:

Michael>  Error while reading the configuration file lyxrc.defaults.
Michael> Please check your installation.

Michael> Removing ~/.lyx-1.4.2svn didn't help. Does anybody have the
Michael> same problem?

Could you try the following patch?

JMarc

Index: src/lyx_main.C
===================================================================
--- src/lyx_main.C	(revision 13790)
+++ src/lyx_main.C	(working copy)
@@ -611,8 +611,6 @@ void LyX::deadKeyBindings(kb_keymap * kb
 
 bool LyX::queryUserLyXDir(bool explicit_userdir)
 {
-	bool reconfigure = false;
-
 	// Does user directory exist?
 	if (fs::exists(package().user_support()) &&
 	    fs::is_directory(package().user_support())) {
@@ -621,13 +619,14 @@ bool LyX::queryUserLyXDir(bool explicit_
 			AddName(package().system_support(), "configure.py");
 		string const userDefaults =
 			AddName(package().user_support(), "lyxrc.defaults");
-		if (fs::exists(configure_script) &&
-		    fs::exists(userDefaults) &&
-		    fs::last_write_time(configure_script)
-		    > fs::last_write_time(userDefaults)) {
-			reconfigure = true;
-		}
-		return reconfigure;
+
+		// reconfigure is required if either (1) userDefaults
+		// does not exist or (2) it exists but configure.py is
+		// newer.
+		return fs::exists(configure_script) 
+			&& (! fs::exists(userDefaults) 
+			    || fs::last_write_time(configure_script)
+			    > fs::last_write_time(userDefaults));
 	}
 
 	first_start = !explicit_userdir;
@@ -651,7 +650,6 @@ bool LyX::queryUserLyXDir(bool explicit_
 	lyxerr << bformat(_("LyX: Creating directory %1$s"),
 			  package().user_support())
 	       << endl;
-	reconfigure = true;
 
 	if (!createDirectory(package().user_support(), 0755)) {
 		// Failed, so let's exit.
@@ -660,7 +658,7 @@ bool LyX::queryUserLyXDir(bool explicit_
 		exit(1);
 	}
 
-	return reconfigure;
+	return true;
 }
 
 

Reply via email to