Răsfoiți Sursa

Merged revisions 10507-10509 via svnmerge from
svn+ssh://svn.freepascal.org/FPC/svn/fpc/branches/resources

........
r10507 | giulio | 2008-03-19 11:13:54 +0100 (Wed, 19 Mar 2008) | 2 lines

properly handle resource files with spaces in their path
........
r10509 | giulio | 2008-03-20 13:07:31 +0100 (Thu, 20 Mar 2008) | 2 lines

* Strip off path from resource file name when resource file is copied to output directory (fixes #11022)
........

git-svn-id: trunk@10516 -

michael 17 ani în urmă
părinte
comite
e9b3f7feb9
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      compiler/comprsrc.pas

+ 3 - 2
compiler/comprsrc.pas

@@ -338,7 +338,7 @@ procedure TWinLikeResourceFile.Collect(const fn: ansistring);
 begin
   if fResScript=nil then
     fResScript:=TScript.Create(fScriptName);
-  fResScript.Add(fn);
+  fResScript.Add(MaybeQuoted(fn));
   inc(fCollectCount);
 end;
 
@@ -414,7 +414,8 @@ begin
             begin
               { Copy .res file to units output dir. Otherwise .res file will not be found
                 when only compiled units path is available }
-              if not CopyResFile(s,ExtractFileName(res.FPStr)) then exit;
+              res.FPStr:=ExtractFileName(res.FPStr); //store file name only in PPU.
+              if not CopyResFile(s,res.FPStr) then exit;
             end;
         end
       else