diff --git a/Agent_Manager.cs b/Agent_Manager.cs index a5b041c1b2..ec70388928 100644 --- a/Agent_Manager.cs +++ b/Agent_Manager.cs @@ -267,32 +267,32 @@ namespace OpenSim { //shouldn't have to read all this in from disk for every new client - string data_path = System.AppDomain.CurrentDomain.BaseDirectory + @"\layer_data\"; + string data_path = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, @"layer_data"); //send layerdata LayerDataPacket layerpack = new LayerDataPacket(); layerpack.LayerID.Type = 76; - this.SendLayerData(userInfo,ref layerpack, data_path+@"layerdata0.dat"); + this.SendLayerData(userInfo,ref layerpack, System.IO.Path.Combine(data_path, @"layerdata0.dat")); LayerDataPacket layerpack1 = new LayerDataPacket(); layerpack1.LayerID.Type = 76; - this.SendLayerData(userInfo, ref layerpack, data_path+@"layerdata1.dat"); + this.SendLayerData(userInfo, ref layerpack, System.IO.Path.Combine(data_path, @"layerdata1.dat")); LayerDataPacket layerpack2 = new LayerDataPacket(); layerpack2.LayerID.Type = 56; - this.SendLayerData(userInfo, ref layerpack, data_path+@"layerdata2.dat"); + this.SendLayerData(userInfo, ref layerpack, System.IO.Path.Combine(data_path, @"layerdata2.dat")); LayerDataPacket layerpack3 = new LayerDataPacket(); layerpack3.LayerID.Type = 55; - this.SendLayerData(userInfo, ref layerpack, data_path+@"layerdata3.dat"); + this.SendLayerData(userInfo, ref layerpack, System.IO.Path.Combine(data_path, @"layerdata3.dat")); LayerDataPacket layerpack4 = new LayerDataPacket(); layerpack4.LayerID.Type = 56; - this.SendLayerData(userInfo, ref layerpack, data_path+@"layerdata4.dat"); + this.SendLayerData(userInfo, ref layerpack, System.IO.Path.Combine(data_path, @"layerdata4.dat")); LayerDataPacket layerpack5 = new LayerDataPacket(); layerpack5.LayerID.Type = 55; - this.SendLayerData(userInfo, ref layerpack, data_path+@"layerdata5.dat"); + this.SendLayerData(userInfo, ref layerpack, System.IO.Path.Combine(data_path, @"layerdata5.dat")); //send intial set of captured prims data? this.Prim_Manager.ReadPrimDatabase( "objectdatabase.ini", userInfo); diff --git a/AssetManagement.cs b/AssetManagement.cs index ad637333a3..0656494909 100644 --- a/AssetManagement.cs +++ b/AssetManagement.cs @@ -218,14 +218,14 @@ namespace OpenSim string folder; if(Image) { - folder = @"\textures\"; + folder = @"textures"; } else { - folder = @"\assets\"; + folder = @"assets"; } - string data_path = System.AppDomain.CurrentDomain.BaseDirectory + folder; - string filename = data_path+@info.filename; + string data_path = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, folder); + string filename = System.IO.Path.Combine(data_path, @info.filename); FileInfo fInfo = new FileInfo(filename); long numBytes = fInfo.Length; diff --git a/Prim_manager.cs b/Prim_manager.cs index aa1c32aad6..3b6af10125 100644 --- a/Prim_manager.cs +++ b/Prim_manager.cs @@ -310,10 +310,10 @@ namespace OpenSim objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[num]; // int count=0; - string data_path = System.AppDomain.CurrentDomain.BaseDirectory + @"\data\"; + string data_path = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, @"data"); for(int cc = 0; cc < num; cc++) { - string filenam = data_path+@"prim_updates"+start+".dat"; + string filenam = System.IO.Path.Combine(data_path, @"prim_updates"+start+".dat"); int i = 0; //FileInfo fInfo = new FileInfo("objectupate"+start+".dat"); FileInfo fInfo = new FileInfo(filenam);