fix(core): update

This commit is contained in:
Philipp Kunz 2021-04-19 14:13:53 +00:00
parent 36a5c2480f
commit cb48cfa948
2 changed files with 1 additions and 1 deletions

View File

@ -12,6 +12,7 @@ export class SmartArchive {
public async extractArchiveFromUrlToFs(urlArg: string, targetDir: string) { public async extractArchiveFromUrlToFs(urlArg: string, targetDir: string) {
const parsedPath = plugins.path.parse(urlArg); const parsedPath = plugins.path.parse(urlArg);
const uniqueFileName = plugins.smartunique.uni() + parsedPath.ext; const uniqueFileName = plugins.smartunique.uni() + parsedPath.ext;
plugins.smartfile.fs.ensureDir(paths.nogitDir);
const downloadPath = plugins.path.join(paths.nogitDir, uniqueFileName); const downloadPath = plugins.path.join(paths.nogitDir, uniqueFileName);
const downloadedArchive = (await plugins.smartrequest.getBinary(urlArg)).body; const downloadedArchive = (await plugins.smartrequest.getBinary(urlArg)).body;
await plugins.smartfile.memory.toFs(downloadedArchive, downloadPath); await plugins.smartfile.memory.toFs(downloadedArchive, downloadPath);

View File

@ -2,4 +2,3 @@ import * as plugins from './smartarchive.plugins';
export const packageDir = plugins.path.join(__dirname, '../'); export const packageDir = plugins.path.join(__dirname, '../');
export const nogitDir = plugins.path.join(__dirname, './.nogit'); export const nogitDir = plugins.path.join(__dirname, './.nogit');
plugins.smartfile.fs.ensureDir(nogitDir);