mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-16 08:13:30 +00:00
1.) Fixed base folder bug if single file is passed
2.) Updated db JavaScript object to support compressed records
This commit is contained in:
@@ -126,7 +126,7 @@ if (process.argv.length > 1)
|
||||
{
|
||||
var src = require('fs').readFileSync(process.argv[2] + '.js', 'rb');
|
||||
var src2 = Buffer.concat([Buffer.alloc(4), src]);
|
||||
db.Put('CoreModule', src2);
|
||||
db.PutCompressed('CoreModule', src2);
|
||||
console.log(process.argv[2] + ' imported');
|
||||
}
|
||||
process.exit();
|
||||
|
||||
@@ -54,6 +54,7 @@ function getBaseFolder(val)
|
||||
|
||||
if (val.length == 1)
|
||||
{
|
||||
if (test[0].length == 1) { return (''); }
|
||||
test[0].pop();
|
||||
return (test.join(D) + D);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user