]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_main.C
Fix class switching bug
[lyx.git] / src / lyx_main.C
index caf25a6908a24e8a7ef8d745d5f6a1e9cced187a..94c84c60de004e79459f0c86e11e938934f03f25 100644 (file)
@@ -351,10 +351,10 @@ void LyX::init(int */*argc*/, char **argv, bool gui)
        bool explicit_userdir = true;
        if (user_lyxdir.empty()) {
 
-       // LYX_USERDIR_11x environment variable
+               // LYX_USERDIR_11x environment variable
                user_lyxdir = GetEnvPath("LYX_USERDIR_11x");
 
-       // default behaviour
+               // default behaviour
                if (user_lyxdir.empty())
                        user_lyxdir = AddPath(GetEnvPath("HOME"),
                                                        string(".") + PACKAGE);
@@ -364,8 +364,10 @@ void LyX::init(int */*argc*/, char **argv, bool gui)
        lyxerr[Debug::INIT] << "User LyX directory: '" 
                            <<  user_lyxdir << '\'' << endl;
 
-       // Check that user LyX directory is ok.
-       queryUserLyXDir(explicit_userdir);
+       // Check that user LyX directory is ok. We don't do that if
+       // running in batch mode.
+       if (gui)
+               queryUserLyXDir(explicit_userdir);
 
        //
        // Shine up lyxrc defaults