diff options
| author | Daniel Bovensiepen <[email protected]> | 2012-12-08 17:49:08 +0800 |
|---|---|---|
| committer | Daniel Bovensiepen <[email protected]> | 2012-12-08 17:49:08 +0800 |
| commit | 54ef99d8dfc18952fd647eb3012b21f54e9d0416 (patch) | |
| tree | 73f887696e775e9562091832de94e69789c2846c | |
| parent | 88767c3d7188af54182c548fece1fbaa221c9e7d (diff) | |
| download | mruby-54ef99d8dfc18952fd647eb3012b21f54e9d0416.tar.gz mruby-54ef99d8dfc18952fd647eb3012b21f54e9d0416.zip | |
mrbgems: recognize absolute path under WIN32
| -rw-r--r-- | mrbgems/generator.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mrbgems/generator.c b/mrbgems/generator.c index 18965d6fa..cbad09747 100644 --- a/mrbgems/generator.c +++ b/mrbgems/generator.c @@ -30,6 +30,13 @@ static char { char full_path[1024] = { 0 }; if (path[0] == '/') { + /* An absolute UNIX path starts with a slash */ + strcpy(full_path, path); + } + else if (path[1] == ':') { + /* An absolute path on WIN32 starts + * with a drive like "c://path/to/somewhere" + */ strcpy(full_path, path); } else { |
