Browse Source

* changed type of TAbstractSearchRec.name_do_not_touch from untyped pointer
into rawbytestring because otherwise -gt can overwrite it
- removed hack from r25944 in morphos/sysutils.pp that worked around this
problem

git-svn-id: trunk@25952 -

Jonas Maebe 11 years ago
parent
commit
8fe7d82db7
2 changed files with 4 additions and 4 deletions
  1. 0 2
      rtl/morphos/sysutils.pp
  2. 4 2
      rtl/objpas/sysutils/filutil.inc

+ 0 - 2
rtl/morphos/sysutils.pp

@@ -379,8 +379,6 @@ var
   validDate: boolean;
 begin
   result:=-1; { We emulate Linux/Unix behaviour, and return -1 on errors. }
-  { Initialize out Rslt, this is a *MUST*, because of caller side magic in objpas/sysutils/filutil.inc }
-  fillchar(Rslt,sizeof(Rslt),0);
 
   tmpStr:=PathConv(ToSingleByteFileSystemEncodedFileName(Path));
 

+ 4 - 2
rtl/objpas/sysutils/filutil.inc

@@ -428,8 +428,10 @@ type
     Size : Int64;
     Attr : Longint;
     { this will be assigned by the generic code; it is actually either a
-      rawbytestring or unicodestring}
-    Name_do_not_touch : pointer;
+      rawbytestring or unicodestring; keep it a reference-counted type
+      so that -gt doesn't overwrite it, the field name should be
+      indication enough that you should not touch it }
+    Name_do_not_touch : RawByteString;
     ExcludeAttr : Longint;
   {$ifdef unix}
     FindHandle : Pointer;