From ced472b47e52e6aaf41f0b27884ca5cf0220d278 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Tue, 12 Jan 2016 08:16:13 -0800 Subject: [PATCH] fix for last test --- src/js_init.h | 1 - src/js_realm.cpp | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js_init.h b/src/js_init.h index be9f38aa..876844e2 100644 --- a/src/js_init.h +++ b/src/js_init.h @@ -5,7 +5,6 @@ #pragma once #include -#include #ifdef __cplusplus extern "C" { diff --git a/src/js_realm.cpp b/src/js_realm.cpp index f61f48a6..11d9fbc6 100644 --- a/src/js_realm.cpp +++ b/src/js_realm.cpp @@ -108,7 +108,9 @@ std::map &RJSPrototypes(Realm *realm) { // static std::string s_defaultPath = realm::default_realm_file_directory() + "/default.realm"; static std::string s_defaultPath = ""; std::string RJSDefaultPath() { - s_defaultPath = realm::default_realm_file_directory() + "/default.realm"; + if (s_defaultPath.size() == 0) { + s_defaultPath = realm::default_realm_file_directory() + "/default.realm"; + } return s_defaultPath; } void RJSSetDefaultPath(std::string path) {