Fix creation of cache directory
This commit is contained in:
@@ -30,7 +30,12 @@ export class InventoryFolder
|
||||
{
|
||||
this.agent = agent;
|
||||
this.inventoryBase = invBase;
|
||||
this.cacheDir = path.resolve(__dirname + '/cache/' + this.agent.agentID.toString());
|
||||
const cacheLocation = path.resolve(__dirname + '/cache');
|
||||
if (!fs.existsSync(cacheLocation))
|
||||
{
|
||||
fs.mkdirSync(cacheLocation, 0o777);
|
||||
}
|
||||
this.cacheDir = path.resolve(cacheLocation + '/' + this.agent.agentID.toString());
|
||||
if (!fs.existsSync(this.cacheDir))
|
||||
{
|
||||
fs.mkdirSync(this.cacheDir, 0o777);
|
||||
|
||||
@@ -56,7 +56,7 @@ describe('Packets', () =>
|
||||
});
|
||||
done();
|
||||
}
|
||||
catch(err)
|
||||
catch (err)
|
||||
{
|
||||
done(err);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@caspertech/node-metaverse",
|
||||
"version": "0.4.2",
|
||||
"version": "0.4.3",
|
||||
"description": "A node.js interface for Second Life.",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user