Skip to content
This repository has been archived by the owner on Apr 30, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
1.2.2 fix for temp file paths on windows
  • Loading branch information
misprintt committed Feb 20, 2013
1 parent 273e7d3 commit eeba2c3
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGES
@@ -1,3 +1,6 @@
1.2.2
- fixed issue with temp file paths on windows

1.2.1
- added support for class level metadata in fragments (excluding :autoBuild)

Expand Down
8 changes: 7 additions & 1 deletion build/Build.hx
Expand Up @@ -34,7 +34,7 @@ class Build extends mtask.core.BuildBase
{
target.url = "http://github.com/massiveinteractive/mpartial";
target.description = "A Haxe macro library for working with Partials. Supports AVM1, AVM2, JavaScript, Neko and C++.";
target.versionDescription = "Added support for class level @metadata in partial fragments";
target.versionDescription = "Fixed file path of temp files on windows";

target.addTag("macro");
target.addTag("cross");
Expand All @@ -50,6 +50,12 @@ class Build extends mtask.core.BuildBase
rm("src/haxelib.xml");
cp("src/*", path);
}


target.afterCompile = function(path)
{
cp("bin/release/haxelib/haxelib.xml", "src/haxelib.xml");
}
}

@target function example(target:Directory)
Expand Down
6 changes: 5 additions & 1 deletion project.json
@@ -1,9 +1,13 @@
{
"name":"MPartial",
"version":"1.2.1",
"version":"1.2.2",
"id":"mpartial",
"dependencies":
{
"mconsole":"1.x"
},
"haxelib":
{
"user": "massive"
}
}
4 changes: 2 additions & 2 deletions src/haxelib.xml
@@ -1,7 +1,7 @@
<project name="mpartial" url="http://github.com/massiveinteractive/mpartial" license="MIT">
<user name="massive"/>
<user name="default.user"/>
<description><![CDATA[A Haxe macro library for working with Partials. Supports AVM1, AVM2, JavaScript, Neko and C++.]]></description>
<version name="1.2.1"><![CDATA[Added support for class level @metadata in partial fragments]]></version>
<version name="1.2.2"><![CDATA[Fixed file path of temp files on windows]]></version>
<depends name="mconsole"/>
<depends name="tink_macros"/>
<tag v="macro"/>
Expand Down
12 changes: 7 additions & 5 deletions src/mpartial/PartialsMacro.hx
Expand Up @@ -177,18 +177,20 @@ class PartialsMacro

static function createTempDirectory()
{
var temp = TEMP_DIR.split("/");
var parts = TEMP_DIR.split("/");

var path = "";

while(temp.length > 0)
while(parts.length > 0)
{
var part = temp.shift();
if(part == "" && temp.length == 0) break;
var part = parts.shift();
if(part == "" && parts.length == 0) break;

path += part + "/";
path += part;

if(!FileSystem.exists(path)) FileSystem.createDirectory(path);

path += "/";
}
}

Expand Down

0 comments on commit eeba2c3

Please sign in to comment.