Răsfoiți Sursa

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

........
r12306 | marco | 2008-12-06 13:22:10 +0100 (Sat, 06 Dec 2008) | 4 lines

* a local buffer for pchar based filename handling was still at TP sizes
(80), and did not follow the libraries abstraction (array [tfsize]) for
length of paths. (Reporter Lichtwicht, lazarusforum.de)
........
r12372 | marco | 2008-12-17 00:05:16 +0100 (Wed, 17 Dec 2008) | 1 line

* fixed path_absolute, somehow it was not implemented for windows. Probably the $IF for windows fell away. Now defined for go32v2. Fixes 12370, and the solution was hinted at in that bugreport.
........

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

marco 16 ani în urmă
părinte
comite
881d8b152c
2 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 1 0
      compiler/cfileutils.pas
  2. 1 1
      packages/unzip/src/unzip.pp

+ 1 - 0
compiler/cfileutils.pas

@@ -471,6 +471,7 @@ implementation
 {$elseif defined(macos)}
         if IsMacFullPath(s) then
           result:=true;
+{$elseif defined(win32) or defined(win64) or defined(go32v2)}
         if ((length(s)>0) and ((s[1]='\') or (s[1]='/'))) or
            ((length(s)>2) and (s[2]=':') and ((s[3]='\') or (s[3]='/'))) then
           result:=true;

+ 1 - 1
packages/unzip/src/unzip.pp

@@ -2225,7 +2225,7 @@ FUNCTION unzipfile ( in_name : pchar;out_name : pchar;offset : longint;
   hFileAction : word;cm_index : integer ) : integer;
 VAR err : integer;
     header : plocalheader;
-    buf : ARRAY [ 0..80 ] of char;
+    buf : ARRAY [ 0..tfSize+1 ] of char;
 {$ifndef unix}
     buf0 : ARRAY [ 0..3 ] of char;
 {$endif}