Parcourir la source

Merged revisions 7485 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r7485 | peter | 2007-05-27 12:50:51 +0200 (Sun, 27 May 2007) | 2 lines

* force Archvie bit for file to get a difference if a fileexists or not
........

git-svn-id: branches/fixes_2_2@7486 -

peter il y a 18 ans
Parent
commit
f644f77fb6
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      compiler/cfileutils.pas

+ 5 - 1
compiler/cfileutils.pas

@@ -153,6 +153,10 @@ implementation
                  (dir.Name<>'.') or
                  (dir.Name<>'..') then
                 begin
+                  { Force Archive bit so the attribute always has a value. This is needed
+                    to be able to see the difference in the directoryentries lookup if a file
+                    exists or not }
+                  Dir.Attr:=Dir.Attr or faArchive;
                   if not(tf_files_case_sensitive in source_info.flags) then
                     DirectoryEntries.Add(Lower(Dir.Name),Pointer(Ptrint(Dir.Attr)))
                   else
@@ -1003,7 +1007,7 @@ implementation
              while (pc^<>sepch) and (pc^<>';') and (pc^<>#0) do
               inc(pc);
              SetLength(singlepathstring, pc-startpc);
-             move(startpc^,singlepathstring[1],pc-startpc);            
+             move(startpc^,singlepathstring[1],pc-startpc);
              singlepathstring:=FixPath(ExpandFileName(singlepathstring),false);
              result:=FileExistsNonCase(singlepathstring,f,allowcache,FoundFile);
              if result then