You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ExportTemplateManager.installTemplateFromFile=function(file,type,callback){console.log("begin install template, from file : "+file);varreadStream=fs.createReadStream(file.toString());vartargetDir=ExportTemplateManager.getUserTemplateDirectory().toString();targetDir=targetDir.concat("/"+type);varindex=readStream.path.lastIndexOf("/");// <--- Windows is using backslash as path separator!!varfileName=readStream.path.substring(index+1);// index is always -1 on WindowstargetDir=targetDir.concat("/"+fileName.replace(/\.[^\.]+$/,"")+"_"+Math.ceil(Math.random()*1000)+"_"+(newDate().getTime()));readStream.pipe(unzip.Extract({path: targetDir})).on("entry",function(entry){varstat=fs.statSync(targetDir);if(!stat||!stat.isDirectory()){fs.mkdirSync(targetDir);}})
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: