소스 검색

* Fix include file directory and return false for FileNewer if FileAge return -1

git-svn-id: trunk@20410 -
pierre 13 년 전
부모
커밋
85c84bf128
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. 10 1
      packages/fpmkunit/src/fpmkunit.pp

+ 10 - 1
packages/fpmkunit/src/fpmkunit.pp

@@ -4244,6 +4244,12 @@ Var
 
 begin
   DS:=FileAge(Src);
+  { Return false if file not found or not accessible }
+  if DS=-1 then
+    begin
+      Result:=false;
+      exit;
+    end;
   DD:=FileAge(Dest);
   D1:=FileDateToDateTime(DS);
   D2:=FileDateToDateTime(DD);
@@ -4857,7 +4863,10 @@ begin
                 depInclude :
                   begin
                     if D.TargetFileName<>'' then
-                      Result:=FileNewer(D.TargetFileName,OFN)
+                      begin
+                        TFN:=AddPathPrefix(APackage,D.TargetFileName);
+                        Result:=FileNewer(TFN,OFN);
+                      end;
                   end;
                 depPackage :
                   begin