aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/AssetInventoryServer/Plugins/Simple
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs15
1 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs
index e7e898b..890a6a0 100644
--- a/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs
+++ b/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
97 public BackendResponse TryFetchDataMetadata(UUID assetID, out AssetBase asset) 97 public BackendResponse TryFetchDataMetadata(UUID assetID, out AssetBase asset)
98 { 98 {
99 asset = new AssetBase(); 99 asset = new AssetBase();
100 AssetMetadata metadata = asset.Metadata; 100 AssetMetadata metadata = asset.getMetadata();
101 101
102 string filename; 102 string filename;
103 BackendResponse ret; 103 BackendResponse ret;
@@ -116,8 +116,8 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
116 ret = BackendResponse.Failure; 116 ret = BackendResponse.Failure;
117 } 117 }
118 118
119 asset.Metadata.Type = (sbyte) Utils.ContentTypeToSLAssetType(asset.Metadata.ContentType); 119 asset.Type = (sbyte) Utils.ContentTypeToSLAssetType(metadata.ContentType);
120 asset.Metadata.Local = false; 120 asset.Local = false;
121 } 121 }
122 else 122 else
123 { 123 {
@@ -139,11 +139,12 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
139 public BackendResponse TryCreateAsset(AssetBase asset) 139 public BackendResponse TryCreateAsset(AssetBase asset)
140 { 140 {
141 BackendResponse ret; 141 BackendResponse ret;
142 AssetMetadata metadata = asset.getMetadata();
142 143
143 string path; 144 string path;
144 string filename = String.Format("{0}.{1}", asset.FullID, Utils.ContentTypeToExtension(asset.Metadata.ContentType)); 145 string filename = String.Format("{0}.{1}", asset.FullID, Utils.ContentTypeToExtension(metadata.ContentType));
145 146
146 if (asset.Metadata.Temporary) 147 if (asset.Temporary)
147 path = Path.Combine(TEMP_DATA_DIR, filename); 148 path = Path.Combine(TEMP_DATA_DIR, filename);
148 else 149 else
149 path = Path.Combine(DEFAULT_DATA_DIR, filename); 150 path = Path.Combine(DEFAULT_DATA_DIR, filename);
@@ -154,10 +155,10 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
154 lock (filenames) filenames[asset.FullID] = path; 155 lock (filenames) filenames[asset.FullID] = path;
155 156
156 // Set the creation date to right now 157 // Set the creation date to right now
157 asset.Metadata.CreationDate = DateTime.Now; 158 metadata.CreationDate = DateTime.Now;
158 159
159 lock (metadataStorage) 160 lock (metadataStorage)
160 metadataStorage[asset.FullID] = asset.Metadata; 161 metadataStorage[asset.FullID] = metadata;
161 162
162 ret = BackendResponse.Success; 163 ret = BackendResponse.Success;
163 } 164 }