private string GetFilename(string filename)
{
if (Path.IsPathRooted(filename) || currentPath == null)
if (File.Exists(filename))
return filename;
else
return null;
string newname = Path.Combine(currentPath, filename);
if (File.Exists(newname))
return newname;
newname = Path.Combine(".", filename);
if (File.Exists(newname))
return newname;
return null;
}