Skip to content

Commit

Permalink
Merge pull request #353 from srottem/master
Browse files Browse the repository at this point in the history
Fix issue #171.
  • Loading branch information
mbrainiac committed Jun 27, 2017
2 parents 55ede7d + 9295ba4 commit 8e0f210
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/pencil-core/definition/exportTemplateManager.js
Expand Up @@ -145,7 +145,7 @@ ExportTemplateManager.installTemplateFromFile = function (file, type , callback)
var readStream = fs.createReadStream(file.toString());
var targetDir = ExportTemplateManager.getUserTemplateDirectory().toString();
targetDir = targetDir.concat("/"+type);
var index = readStream.path.lastIndexOf("/");
var index = readStream.path.lastIndexOf(path.sep);
var fileName = readStream.path.substring(index + 1);
targetDir = targetDir.concat("/" + fileName.replace(/\.[^\.]+$/, "") + "_" + Math.ceil(Math.random() * 1000) + "_" + (new Date().getTime()));
readStream
Expand Down

0 comments on commit 8e0f210

Please sign in to comment.