@@ -845,18 +845,10 @@ private static FileMetadata OSXConvert(OSXDirEnt entry, StdString path)
845
845
str . Append ( entry . d_name , length ) ;
846
846
* ( str . Data + str . Size ) = '\0 ' ;
847
847
FileMetadata meta = new ( ) ;
848
- meta . Path = str ;
849
-
850
- Console . WriteLine ( $ "OSXConvert -> Ptr: { ( nint ) str . Data } ") ;
851
-
852
- Console . WriteLine ( $ "OSXConvert meta -> Ptr: { ( nint ) meta . Path . Data } ") ; // not null.
853
848
854
849
OSXFileStat ( str , out var stat ) ;
855
850
856
- Console . WriteLine ( $ "OSXConvert meta -> Ptr: { ( nint ) meta . Path . Data } ") ;
857
-
858
- Console . WriteLine ( $ "OSXConvert str -> Ptr: { ( nint ) str . Data } ") ;
859
-
851
+ meta . Path = str ;
860
852
meta . CreationTime = stat . st_ctimespec ;
861
853
meta . LastAccessTime = stat . st_atimespec ;
862
854
meta . LastWriteTime = stat . st_mtimespec ;
@@ -865,16 +857,16 @@ private static FileMetadata OSXConvert(OSXDirEnt entry, StdString path)
865
857
866
858
Console . WriteLine ( $ "OSXConvert meta -> Ptr: { ( nint ) meta . Path . Data } ") ; // suddenly becomes null
867
859
868
- Console . WriteLine ( $ "OSXConvert str -> Ptr: { ( nint ) str . Data } ") ;
860
+ Console . WriteLine ( $ "OSXConvert str -> Ptr: { ( nint ) str . Data } ") ; // not null.
869
861
870
862
return meta ;
871
863
}
872
864
873
865
private static void OSXFileStat ( StdWString str , out OSXStat stat )
874
866
{
875
- Console . WriteLine ( $ "OSXFileStat -> Ptr: { ( nint ) str . Data } ") ;
867
+ Console . WriteLine ( $ "OSXFileStat -> Ptr: { ( nint ) str . Data } ") ; // not null
876
868
int strSize0 = Encoding . UTF8 . GetByteCount ( str . Data , str . Size ) ;
877
- Console . WriteLine ( $ "OSXFileStat -> Ptr: { ( nint ) str . Data } ") ;
869
+ Console . WriteLine ( $ "OSXFileStat -> Ptr: { ( nint ) str . Data } ") ; // not null
878
870
byte * pStr0 ;
879
871
if ( strSize0 >= Utils . MaxStackallocSize )
880
872
{
@@ -887,14 +879,14 @@ private static void OSXFileStat(StdWString str, out OSXStat stat)
887
879
}
888
880
Encoding . UTF8 . GetBytes ( str . Data , str . Size , pStr0 , strSize0 ) ;
889
881
pStr0 [ strSize0 ] = 0 ;
890
- Console . WriteLine ( $ "OSXFileStat -> Ptr: { ( nint ) str . Data } ") ;
882
+ Console . WriteLine ( $ "OSXFileStat -> Ptr: { ( nint ) str . Data } ") ; // not null
891
883
OSXFileStat ( pStr0 , out stat ) ;
892
- Console . WriteLine ( $ "OSXFileStat -> Ptr: { ( nint ) str . Data } ") ;
884
+ Console . WriteLine ( $ "OSXFileStat -> Ptr: { ( nint ) str . Data } ") ; // not null
893
885
if ( strSize0 >= Utils . MaxStackallocSize )
894
886
{
895
887
Utils . Free ( pStr0 ) ;
896
888
}
897
- Console . WriteLine ( $ "OSXFileStat -> Ptr: { ( nint ) str . Data } ") ;
889
+ Console . WriteLine ( $ "OSXFileStat -> Ptr: { ( nint ) str . Data } ") ; // not null
898
890
}
899
891
900
892
#endregion OSX
0 commit comments