]> git.lyx.org Git - features.git/commitdiff
Revert "Exit with error if no filename given to -e switch"
authorScott Kostyshak <skostysh@lyx.org>
Fri, 29 Mar 2013 15:20:23 +0000 (11:20 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Fri, 29 Mar 2013 15:20:23 +0000 (11:20 -0400)
This reverts commit 6df4a7bb4018c7e13e191e59fdd5d9f768ce5592.

As Vincent points out, this commit is not correct. For one reason,
it would incorrectly exit with error for the following syntax:

lyx myfile.lyx -e pdf

I will look for a correct solution to the problem specified in the
message of the reverted commit.

src/LyX.cpp

index 885e2bc302f0d594944a3e631304633d6c741484..ec522dead9ee3a6ce79a120b7d3309750dda30b4 100644 (file)
@@ -1119,17 +1119,13 @@ int parse_export_to(string const & type, string const & output_file, string & ba
 }
 
 
-int parse_export(string const & type, string const & file, string & batch)
+int parse_export(string const & type, string const &, string & batch)
 {
        if (type.empty()) {
                lyxerr << to_utf8(_("Missing file type [eg latex, ps...] after "
                                         "--export switch")) << endl;
                exit(1);
        }
-       if (file.empty()) {
-               lyxerr << to_utf8(_("Missing filename after format")) << endl;
-               exit(1);
-       }
        batch = "buffer-export " + type;
        use_gui = false;
        return 1;