diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-12-12 22:34:10 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-12-12 22:34:10 +0900 |
| commit | c863e0dac85b2251a77e2a137d7bac0548e23932 (patch) | |
| tree | 26eac30377d28138c269186df9e7f80c0b471314 /mrbgems/mruby-io | |
| parent | c6ea9480300a45e9611ac6640022b9d913c4a31e (diff) | |
| parent | e71a6a7b2c8a7217a7efd35f74782d4a2c058cda (diff) | |
| download | mruby-c863e0dac85b2251a77e2a137d7bac0548e23932.tar.gz mruby-c863e0dac85b2251a77e2a137d7bac0548e23932.zip | |
Merge pull request #3885 from Shokuji/cygwin_mruby_io_test
fixed mruby-io so that the test passes on cygwin
Diffstat (limited to 'mrbgems/mruby-io')
| -rw-r--r-- | mrbgems/mruby-io/src/file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mrbgems/mruby-io/src/file.c b/mrbgems/mruby-io/src/file.c index 19603c856..17fdeeed5 100644 --- a/mrbgems/mruby-io/src/file.c +++ b/mrbgems/mruby-io/src/file.c @@ -200,6 +200,7 @@ mrb_file_basename(mrb_state *mrb, mrb_value klass) if ((bname = basename(path)) == NULL) { mrb_sys_fail(mrb, "basename"); } + if (strncmp(bname, "//", 3) == 0) bname[1] = '\0'; /* patch for Cygwin */ return mrb_str_new_cstr(mrb, bname); #endif } |
