mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
- remove the Metadata property from AssetBase and return all previous
properties as before - prefix private variables with m_ in AssetBase.cs - related to Mantis #3122, as mentioned in https://lists.berlios.de/pipermail/opensim-dev/2009-February/005088.html - all services will likely need to be upgraded after this commit
This commit is contained in:
@@ -97,7 +97,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
|
||||
public BackendResponse TryFetchDataMetadata(UUID assetID, out AssetBase asset)
|
||||
{
|
||||
asset = new AssetBase();
|
||||
AssetMetadata metadata = asset.Metadata;
|
||||
AssetMetadata metadata = asset.getMetadata();
|
||||
|
||||
string filename;
|
||||
BackendResponse ret;
|
||||
@@ -116,8 +116,8 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
|
||||
ret = BackendResponse.Failure;
|
||||
}
|
||||
|
||||
asset.Metadata.Type = (sbyte) Utils.ContentTypeToSLAssetType(asset.Metadata.ContentType);
|
||||
asset.Metadata.Local = false;
|
||||
asset.Type = (sbyte) Utils.ContentTypeToSLAssetType(metadata.ContentType);
|
||||
asset.Local = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -139,11 +139,12 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
|
||||
public BackendResponse TryCreateAsset(AssetBase asset)
|
||||
{
|
||||
BackendResponse ret;
|
||||
AssetMetadata metadata = asset.getMetadata();
|
||||
|
||||
string path;
|
||||
string filename = String.Format("{0}.{1}", asset.FullID, Utils.ContentTypeToExtension(asset.Metadata.ContentType));
|
||||
string filename = String.Format("{0}.{1}", asset.FullID, Utils.ContentTypeToExtension(metadata.ContentType));
|
||||
|
||||
if (asset.Metadata.Temporary)
|
||||
if (asset.Temporary)
|
||||
path = Path.Combine(TEMP_DATA_DIR, filename);
|
||||
else
|
||||
path = Path.Combine(DEFAULT_DATA_DIR, filename);
|
||||
@@ -154,10 +155,10 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
|
||||
lock (filenames) filenames[asset.FullID] = path;
|
||||
|
||||
// Set the creation date to right now
|
||||
asset.Metadata.CreationDate = DateTime.Now;
|
||||
metadata.CreationDate = DateTime.Now;
|
||||
|
||||
lock (metadataStorage)
|
||||
metadataStorage[asset.FullID] = asset.Metadata;
|
||||
metadataStorage[asset.FullID] = metadata;
|
||||
|
||||
ret = BackendResponse.Success;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user