This repository was archived by the owner on Dec 3, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -626,7 +626,7 @@ bool RbFileManager::openFile(std::ifstream& strm)
626
626
627
627
// concatenate path and file name
628
628
std::string file_pathName = file_path + path_separator + file_name;
629
-
629
+
630
630
// here we assume that the presence of the path/file has
631
631
// been checked elsewhere
632
632
strm.open ( file_pathName.c_str (), std::ios::in );
Original file line number Diff line number Diff line change @@ -41,8 +41,12 @@ RevPtr<RevVariable> Func_source::execute( void )
41
41
42
42
/* Open file */
43
43
std::string fname = static_cast <const RlString &>( args[0 ].getVariable ()->getRevObject () ).getValue ();
44
- std::ifstream inFile ( fname.c_str () );
45
-
44
+
45
+ RevBayesCore::RbFileManager reader = RevBayesCore::RbFileManager (fname);
46
+ std::ifstream inFile;
47
+
48
+ // now open the stream
49
+ reader.openFile (inFile);
46
50
47
51
bool echo_on = static_cast <const RlBoolean &>( args[1 ].getVariable ()->getRevObject () ).getValue ();
48
52
@@ -63,7 +67,6 @@ RevPtr<RevVariable> Func_source::execute( void )
63
67
64
68
// Read a line
65
69
std::string line;
66
- RevBayesCore::RbFileManager reader = RevBayesCore::RbFileManager ();
67
70
reader.safeGetline (inFile, line);
68
71
lineNumber++;
69
72
You can’t perform that action at this time.
0 commit comments