Unverified Commit 30eaee30 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #4950 from Reckordp/master

Absolute path for windows
parents 7905431f 8df49ea9
......@@ -282,7 +282,12 @@ mrb_file__getwd(mrb_state *mrb, mrb_value klass)
static int
mrb_file_is_absolute_path(const char *path)
{
#ifdef _WIN32
if (strlen(path) < 2) return 0;
return path[0] >= 64 && path[0] <= 90 && path[1] == ':'; // 64 to 90 is ASCII
#else
return (path[0] == '/');
#endif
}
static mrb_value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment