From: Latif Khalifa Date: Mon, 24 Aug 2009 21:51:20 +0000 (+0000) Subject: Skip non full permission items in the correct place. X-Git-Tag: release-1.8~40 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4d087b0bbded1ede0e6a2ac0b1cade2c3069880b;p=radegast%2Fradegast.git Skip non full permission items in the correct place. git-svn-id: https://radegast.googlecode.com/svn/trunk@158 f7a694da-4d33-11de-9ad6-1127a62b9fcd --- diff --git a/Radegast/GUI/Consoles/Inventory/InventoryBackup.cs b/Radegast/GUI/Consoles/Inventory/InventoryBackup.cs index a27517c..952d96a 100644 --- a/Radegast/GUI/Consoles/Inventory/InventoryBackup.cs +++ b/Radegast/GUI/Consoles/Inventory/InventoryBackup.cs @@ -118,6 +118,10 @@ namespace Radegast { InventoryItem item = (InventoryItem)n.Data; + PermissionMask fullPerm = PermissionMask.Modify | PermissionMask.Copy | PermissionMask.Transfer; + if ((item.Permissions.OwnerMask & fullPerm) != fullPerm) + continue; + if (item.AssetType == AssetType.LSLText || item.AssetType == AssetType.Notecard) { ListViewItem lvi = new ListViewItem(); @@ -184,11 +188,14 @@ namespace Radegast { File.WriteAllText(fullName, note.BodyText, System.Text.Encoding.UTF8); } + else + { + Logger.Log(string.Format("Falied to decode asset for '{0}' - {1}", item.Name, receivedAsset.AssetID), Helpers.LogLevel.Warning, client); + } + break; case AssetType.LSLText: - if ((item.Permissions.OwnerMask & (PermissionMask.Modify | PermissionMask.Copy | PermissionMask.Transfer)) == 0) - break; fullName = folderName + filePartial + ".lsl"; dirName = Path.GetDirectoryName(fullName); @@ -202,6 +209,11 @@ namespace Radegast { File.WriteAllText(fullName, script.Source, System.Text.Encoding.UTF8); } + else + { + Logger.Log(string.Format("Falied to decode asset for '{0}' - {1}", item.Name, receivedAsset.AssetID), Helpers.LogLevel.Warning, client); + } + break; }