diff options
Diffstat (limited to 'sim/universe.cc')
-rw-r--r-- | sim/universe.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sim/universe.cc b/sim/universe.cc index 69563650d..115f6f790 100644 --- a/sim/universe.cc +++ b/sim/universe.cc @@ -28,6 +28,7 @@ #include <sys/types.h> #include <sys/stat.h> +#include <errno.h> #include <cstring> #include <fstream> @@ -142,7 +143,8 @@ CREATE_SIM_OBJECT(Root) __ticksPerNS = freq / 1.0e9; __ticksPerPS = freq / 1.0e12; - if (output_dir.isValid()) { + outputDirectory = output_dir; + if (!outputDirectory.empty()) { outputDirectory = output_dir; // guarantee that directory ends with a '/' @@ -158,9 +160,10 @@ CREATE_SIM_OBJECT(Root) } outputStream = makeOutputStream(output_file); - configStream = config_output_file.isValid() - ? makeOutputStream(config_output_file) - : outputStream; + configStream = outputStream; + string cof = config_output_file; + if (!cof.empty()) + configStream = makeOutputStream(cof); return root; } |