summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mrbgems/generator.c7
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 {