Don't try to transfer inventory files with no filename

This commit is contained in:
Casper Warden
2023-11-21 17:38:50 +00:00
parent 5151696e18
commit 3873164475
3 changed files with 10 additions and 4 deletions

View File

@@ -978,8 +978,14 @@ export class GameObject implements IGameObjectData
return FilterResponse.Match;
}
});
const fileName = Utils.BufferToStringSimple(inventory.InventoryData.Filename);
if (inventory.InventoryData.Filename.length === 0)
{
// Inventory is empty
this.inventory = [];
return;
}
const fileName = Utils.BufferToStringSimple(inventory.InventoryData.Filename);
const file = await this.region.circuit.XferFileDown(fileName, true, false, UUID.zero(), AssetType.Unknown, true);
this.inventory = [];
if (file.length === 0)

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@caspertech/node-metaverse",
"version": "0.7.3",
"version": "0.7.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@caspertech/node-metaverse",
"version": "0.7.3",
"version": "0.7.4",
"license": "MIT",
"dependencies": {
"@caspertech/llsd": "^1.0.5",

View File

@@ -1,6 +1,6 @@
{
"name": "@caspertech/node-metaverse",
"version": "0.7.3",
"version": "0.7.4",
"description": "A node.js interface for Second Life.",
"main": "dist/lib/index.js",
"types": "dist/lib/index.d.ts",