]> git.lyx.org Git - features.git/commitdiff
Revert "Remove test for files when using batch mode."
authorRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 31 May 2018 03:13:07 +0000 (23:13 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 31 May 2018 03:13:07 +0000 (23:13 -0400)
We are not really ready for this case.

This reverts commit e143f0b9e94c7285887ab98ff03841a6fe4883c0.

src/LyX.cpp

index 9cdad325985fddd20efa38410accf3485f7404bc..0e1b19faf664f849a37f6add26f620fbad54e2d8 100644 (file)
@@ -493,8 +493,12 @@ int LyX::init(int & argc, char * argv[])
                for (int argi = 1; argi < argc; ++argi)
                        pimpl_->files_to_load_.push_back(os::utf8_argv(argi));
 
-               // doesn't make sense to load the splash file in batch mode
-               if (use_gui && first_start) {
+               if (!use_gui && pimpl_->files_to_load_.empty()) {
+                       lyxerr << to_utf8(_("Missing filename for this operation.")) << endl;
+                       return EXIT_FAILURE;
+               }
+
+               if (first_start) {
                        pimpl_->files_to_load_.push_back(
                                i18nLibFileSearch("examples", "splash.lyx").absFileName());
                }