# HG changeset patch # User John Donoghue # Date 1403436146 14400 # Node ID 9a70705dc61614e9ab1dad182d0ee465326e1956 # Parent 9d185537e5d12ba366f78dd06c9c4b01b2104c86 Check for name and type keyword to return as an octave ascii data file (Bug #42586) * libinterp/corefcn/load-save.cc (get_file_format): attempt to get name and then type keyword to decide if is an Octave ascii file. diff -r 9d185537e5d1 -r 9a70705dc616 libinterp/corefcn/load-save.cc --- a/libinterp/corefcn/load-save.cc Thu Jun 19 20:08:37 2014 -0400 +++ b/libinterp/corefcn/load-save.cc Sun Jun 22 07:22:26 2014 -0400 @@ -265,9 +265,10 @@ file.clear (); file.seekg (0, std::ios::beg); - std::string tmp = extract_keyword (file, "name"); + std::string name_val = extract_keyword (file, "name"); + std::string type_val = extract_keyword (file, "type"); - if (! tmp.empty ()) + if (name_val.empty () != true && type_val.empty () != true) retval = LS_ASCII; else {