File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/OneScript.StandardLibrary/NativeApi Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ public static bool IsZip(Stream stream)
2626 const int ZIP_LEAD_BYTES = 0x04034b50 ;
2727 return ( BitConverter . ToInt32 ( bytes , 0 ) == ZIP_LEAD_BYTES ) ;
2828 }
29+
30+ private static bool Is64BitProcess ( )
31+ {
32+ return IntPtr . Size == 8 ;
33+ }
2934
3035 public static void Extract ( Stream stream , String tempfile )
3136 {
@@ -50,7 +55,7 @@ private static String GetEntryName(ZipFile zip)
5055 using ( var reader = XmlReader . Create ( stream ) )
5156 {
5257 var thisOs = NativeApiProxy . IsLinux ? "Linux" : "Windows" ;
53- var thisArch = System . Environment . Is64BitOperatingSystem ? "x86_64" : "i386" ;
58+ var thisArch = Is64BitProcess ( ) ? "x86_64" : "i386" ;
5459 while ( reader . ReadToFollowing ( "component" ) )
5560 {
5661 var attrOs = reader . GetAttribute ( "os" ) ;
You can’t perform that action at this time.
0 commit comments