X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flily-parser-scheme.cc;h=56de47abbd21945a3ff5ba788027ab5a96240dc8;hb=395ff505e65992fc990678f584adf988241247e9;hp=2521f4e0391d634ccd658b4f396366be678354d0;hpb=8a06a168bb9f6f1c4af92c1c146fce401440e6c9;p=lilypond.git diff --git a/lily/lily-parser-scheme.cc b/lily/lily-parser-scheme.cc index 2521f4e039..56de47abbd 100644 --- a/lily/lily-parser-scheme.cc +++ b/lily/lily-parser-scheme.cc @@ -65,6 +65,7 @@ LY_DEFINE (ly_parse_file, "ly:parse-file", if (!output_name_global.empty ()) { + /* Interpret --output=DIR to mean --output=DIR/BASE. */ string dir; if (is_dir (output_name_global)) @@ -73,7 +74,15 @@ LY_DEFINE (ly_parse_file, "ly:parse-file", output_name_global = ""; } else - dir = dir_name (output_name_global); + { + File_name out (output_name_global); + if (is_dir (out.dir_part ())) + { + dir = out.dir_part (); + out_file_name = out.file_part (); + } + } + if (dir != "" && dir != "." && dir != get_working_directory ()) { global_path.prepend (get_working_directory ());