Corrected logic in path correction for 3d model import

This commit is contained in:
Michael Smith 2016-05-01 23:16:11 -07:00
parent 2cd40e157c
commit 70a417ac88

View File

@ -48,12 +48,15 @@ namespace OSCADSharp.Solids
private void correctPath()
{
string currentDir = Directory.GetCurrentDirectory();
if (!this.filePath.Contains(currentDir))
if (!File.Exists(this.filePath))
{
this.filePath = currentDir + "\\" + this.filePath;
}
string currentDir = Directory.GetCurrentDirectory();
if (!this.filePath.Contains(currentDir))
{
this.filePath = currentDir + "\\" + this.filePath;
}
}
}
#endregion