[0000047] System.IO.Path combine path

brokenplugins
cw 2007-02-12 01:41:44 +00:00
parent 7322d41d81
commit 1c87bdb464
3 changed files with 13 additions and 13 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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);