[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] pnetlib/ISymWrapper SymReader.cs,1.1,1.2
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] pnetlib/ISymWrapper SymReader.cs,1.1,1.2 |
Date: |
Mon, 29 Sep 2003 07:22:05 +0000 |
Update of /cvsroot/dotgnu-pnet/pnetlib/ISymWrapper
In directory subversions:/tmp/cvs-serv27556/ISymWrapper
Modified Files:
SymReader.cs
Log Message:
Resolve source filenames using the link directory, if present.
Index: SymReader.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/ISymWrapper/SymReader.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SymReader.cs 20 Sep 2003 00:30:51 -0000 1.1
--- SymReader.cs 29 Sep 2003 07:22:03 -0000 1.2
***************
*** 33,36 ****
--- 33,37 ----
// Internal state.
private unsafe ISymUnmanagedReader *pReader;
+ private String linkDirectory;
private String filename;
private Encoding utf8;
***************
*** 104,107 ****
--- 105,115 ----
throw new ArgumentException();
}
+
+ // Get the link directory, if specified.
+ SymInfoEnumerator e = new
SymInfoEnumerator(this, "LDIR");
+ if(e.MoveNext())
+ {
+ linkDirectory =
ReadString(e.GetNextInt());
+ }
}
***************
*** 381,384 ****
--- 389,395 ----
internal String FilenameToURL(String name)
{
+ String temp;
+ bool checkOther;
+
// Bail out if the name is empty.
if(name == null || name.Length == 0)
***************
*** 388,394 ****
// Get the full absolute pathname for the file.
! if(!Path.IsPathRooted(name) && filename != null)
{
! String temp = Path.Combine
(Path.GetDirectoryName(filename), name);
if(File.Exists(temp))
--- 399,415 ----
// Get the full absolute pathname for the file.
! checkOther = true;
! if(!Path.IsPathRooted(name) && linkDirectory !=
null)
{
! temp = Path.Combine(linkDirectory,
name);
! if(File.Exists(temp))
! {
! name = temp;
! checkOther = false;
! }
! }
! if(checkOther && !Path.IsPathRooted(name) &&
filename != null)
! {
! temp = Path.Combine
(Path.GetDirectoryName(filename), name);
if(File.Exists(temp))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] pnetlib/ISymWrapper SymReader.cs,1.1,1.2,
Rhys Weatherley <address@hidden> <=