소스 검색

Make search path absolute

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7497 8c9fc860-2736-0410-a75d-ab315db34111
felixf 7 년 전
부모
커밋
085591d3b8
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      source/Win32.WinFS.Mod

+ 6 - 3
source/Win32.WinFS.Mod

@@ -1219,18 +1219,21 @@ VAR
 	END Init;
 	
 	PROCEDURE AddSearchPath*(context: Commands.Context);
-	VAR name: FileName; i,j: LONGINT; ch : CHAR;
+	VAR name,fullName: FileName; i,j: LONGINT; ch : CHAR; ret: LONGINT; fileNamePart: Kernel32.LPSTR;
 	BEGIN
 		IF context.arg.GetString(name) THEN
 			i := 0; j := 0;
 			ConvertChar( name, Files.PathDelimiter, PathDelimiter );
+			ret := Kernel32.GetFullPathName( name, Kernel32.MaxPath, fullName, fileNamePart );
+			
 			WHILE(searchPath[i] # 0X) DO
 				INC(i);
 			END;
+			
 			searchPath[i] := ";";INC(i);
 			REPEAT
-				ch := name[j];
-				searchPath[i] := name[j];
+				ch := fullName[j];
+				searchPath[i] := ch;
 				INC(j);INC(i);
 			UNTIL ch = 0X;
 		END;