aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteAssetData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteAssetData.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 30b26c4..966d0b8 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Data.SQLite
86 86
87 if (dbconnect == string.Empty) 87 if (dbconnect == string.Empty)
88 { 88 {
89 dbconnect = "URI=file:../db/Asset.db,version=3"; 89 dbconnect = "URI=file:Asset.db,version=3";
90 } 90 }
91 m_conn = new SqliteConnection(dbconnect); 91 m_conn = new SqliteConnection(dbconnect);
92 m_conn.Open(); 92 m_conn.Open();
@@ -131,14 +131,14 @@ namespace OpenSim.Data.SQLite
131 /// Create an asset 131 /// Create an asset
132 /// </summary> 132 /// </summary>
133 /// <param name="asset">Asset Base</param> 133 /// <param name="asset">Asset Base</param>
134 override public void StoreAsset(AssetBase asset) 134 override public bool StoreAsset(AssetBase asset)
135 { 135 {
136 string assetName = asset.Name; 136 string assetName = asset.Name;
137 if (asset.Name.Length > AssetBase.MAX_ASSET_NAME) 137 if (asset.Name.Length > AssetBase.MAX_ASSET_NAME)
138 { 138 {
139 assetName = asset.Name.Substring(0, AssetBase.MAX_ASSET_NAME); 139 assetName = asset.Name.Substring(0, AssetBase.MAX_ASSET_NAME);
140 m_log.WarnFormat( 140 m_log.WarnFormat(
141 "[ASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add", 141 "[ASSET DB]: Name '{0}' for asset {1} truncated from {2} to {3} characters on add",
142 asset.Name, asset.ID, asset.Name.Length, assetName.Length); 142 asset.Name, asset.ID, asset.Name.Length, assetName.Length);
143 } 143 }
144 144
@@ -147,7 +147,7 @@ namespace OpenSim.Data.SQLite
147 { 147 {
148 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC); 148 assetDescription = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC);
149 m_log.WarnFormat( 149 m_log.WarnFormat(
150 "[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add", 150 "[ASSET DB]: Description '{0}' for asset {1} truncated from {2} to {3} characters on add",
151 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length); 151 asset.Description, asset.ID, asset.Description.Length, assetDescription.Length);
152 } 152 }
153 153
@@ -171,6 +171,7 @@ namespace OpenSim.Data.SQLite
171 cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); 171 cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
172 172
173 cmd.ExecuteNonQuery(); 173 cmd.ExecuteNonQuery();
174 return true;
174 } 175 }
175 } 176 }
176 } 177 }
@@ -191,6 +192,7 @@ namespace OpenSim.Data.SQLite
191 cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); 192 cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data));
192 193
193 cmd.ExecuteNonQuery(); 194 cmd.ExecuteNonQuery();
195 return true;
194 } 196 }
195 } 197 }
196 } 198 }
@@ -358,7 +360,7 @@ namespace OpenSim.Data.SQLite
358 /// </summary> 360 /// </summary>
359 override public void Initialise() 361 override public void Initialise()
360 { 362 {
361 Initialise("URI=file:../db/Asset.db,version=3"); 363 Initialise("URI=file:Asset.db,version=3");
362 } 364 }
363 365
364 /// <summary> 366 /// <summary>