ftruncateSync insted of rmSync, update package.json

Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
2022-06-05 00:06:06 +07:00
parent a359b47b84
commit dfaafa1b3f
2 changed files with 18 additions and 9 deletions

View File

@@ -63,7 +63,8 @@ getDirectories(argv.res, (err, res) => {
// Checking file for existing, if exists - deleting it // Checking file for existing, if exists - deleting it
try { try {
fs.accessSync(newFilePath); fs.accessSync(newFilePath);
fs.rmSync(newFilePath); //fs.rmSync(newFilePath);
fs.ftruncateSync(newFilePath);
} catch (err) { } catch (err) {
// console.log("access err: " + err); // console.log("access err: " + err);
} }

View File

@@ -1,10 +1,18 @@
{ {
"dependencies": { "name": "MTA model encoder",
"chalk": "^4.1.2", "version": "1.0.0",
"fs-extra": "^10.0.0", "main": "index.js",
"glob": "^7.2.0", "private": "true",
"mta-tea": "^1.0.0", "scripts": {
"ora": "^5.4.1", "build": "pkg --target node16-win-x64 --compress GZip index.js"
"yargs": "^17.3.1" },
} "dependencies": {
"chalk": "^4.1.2",
"fs-extra": "^10.0.0",
"glob": "^7.2.0",
"mta-tea": "^1.0.0",
"ora": "^5.4.1",
"yargs": "^17.3.1"
},
"author": "JDM17 <30170278+JDM170@users.noreply.github.com> (https://github.com/JDM170/model_coder)"
} }