From ae405c26fb235041189613e5028b2176c04e252e Mon Sep 17 00:00:00 2001 From: Inori Date: Thu, 29 Aug 2019 19:53:32 -0400 Subject: [PATCH] Normalize paths returned from MKXP.data_directory --- binding/binding-mri.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/binding/binding-mri.cpp b/binding/binding-mri.cpp index d4c31da6..cbffdf9b 100644 --- a/binding/binding-mri.cpp +++ b/binding/binding-mri.cpp @@ -226,8 +226,12 @@ RB_METHOD(mkxpDataDirectory) const std::string &path = shState->config().customDataPath; const char *s = path.empty() ? "." : path.c_str(); + + char *s_nml = shState->fileSystem().normalize(s, 1, 1); + VALUE ret = rb_str_new_cstr(s_nml); + delete s_nml; - return rb_str_new_cstr(s); + return ret; } RB_METHOD(mkxpPuts)