fixed decompiler errors - project compiles

This commit is contained in:
2017-10-06 18:20:35 +02:00
parent 2d8b6914b8
commit 9cefa0e9dd
40 changed files with 420 additions and 411 deletions

View File

@@ -26,7 +26,7 @@ namespace Rei.Fs.IO
this.pCreationTime = DateTime.FromFileTime((long) d.ftCreationTime.dwHighDateTime << 32 | (long) d.ftCreationTime.dwLowDateTime & (long) uint.MaxValue);
this.pLastAccessTime = DateTime.FromFileTime((long) d.ftLastAccessTime.dwHighDateTime << 32 | (long) d.ftLastAccessTime.dwLowDateTime & (long) uint.MaxValue);
this.pLastWriteTime = DateTime.FromFileTime((long) d.ftLastWriteTime.dwHighDateTime << 32 | (long) d.ftLastWriteTime.dwLowDateTime & (long) uint.MaxValue);
this.pFileSize = checked ((ulong) d.nFileSizeHigh << 32 + (ulong) d.nFileSizeLow);
this.pFileSize = checked (((ulong) d.nFileSizeHigh << 32) + (ulong) d.nFileSizeLow);
this.pFileName = d.cFileName;
this.pAltFileName = d.cAlternateFileName;
this.pFullPath = path;
@@ -38,7 +38,7 @@ namespace Rei.Fs.IO
this.pCreationTime = DateTime.FromFileTime((long) d.ftCreationTime.dwHighDateTime << 32 | (long) d.ftCreationTime.dwLowDateTime & (long) uint.MaxValue);
this.pLastAccessTime = DateTime.FromFileTime((long) d.ftLastAccessTime.dwHighDateTime << 32 | (long) d.ftLastAccessTime.dwLowDateTime & (long) uint.MaxValue);
this.pLastWriteTime = DateTime.FromFileTime((long) d.ftLastWriteTime.dwHighDateTime << 32 | (long) d.ftLastWriteTime.dwLowDateTime & (long) uint.MaxValue);
this.pFileSize = checked ((ulong) d.nFileSizeHigh << 32 + (ulong) d.nFileSizeLow);
this.pFileSize = checked (((ulong) d.nFileSizeHigh << 32) + (ulong) d.nFileSizeLow);
this.pFileName = FileSystem.GetFilename(path);
this.pAltFileName = (string) null;
this.pFullPath = path;

View File

@@ -112,7 +112,7 @@ namespace Rei.Fs.IO
public static bool TryGetFileInfo(string path, ref FileInfo info)
{
string path1 = FileSystem.NormalizePath(path);
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData;
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData=new Win32Native.WIN32_FILE_ATTRIBUTE_DATA();
if (!Win32Native.GetFileAttributesEx(FileSystem.NormalizePath(path), Win32Native.GET_FILEEX_INFO_LEVELS.GetFileExInfoStandard, ref fileData))
{
switch (Marshal.GetLastWin32Error())
@@ -136,7 +136,7 @@ namespace Rei.Fs.IO
public static bool FileOrDirectoryExists(string path, ref bool isdirectory)
{
Win32Native.ErrorModeType uMode = Win32Native.SetErrorMode(Win32Native.ErrorModeType.SEM_FAILCRITICALERRORS);
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData;
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData = new Win32Native.WIN32_FILE_ATTRIBUTE_DATA();
bool fileAttributesEx;
try
{
@@ -166,7 +166,7 @@ namespace Rei.Fs.IO
public static bool FileExists(string path)
{
Win32Native.ErrorModeType uMode = Win32Native.SetErrorMode(Win32Native.ErrorModeType.SEM_FAILCRITICALERRORS);
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData;
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData = new Win32Native.WIN32_FILE_ATTRIBUTE_DATA();
bool fileAttributesEx;
try
{
@@ -193,7 +193,7 @@ namespace Rei.Fs.IO
public static bool DirectoryExists(string path)
{
Win32Native.ErrorModeType uMode = Win32Native.SetErrorMode(Win32Native.ErrorModeType.SEM_FAILCRITICALERRORS);
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData;
Win32Native.WIN32_FILE_ATTRIBUTE_DATA fileData = new Win32Native.WIN32_FILE_ATTRIBUTE_DATA();
bool fileAttributesEx;
try
{
@@ -237,7 +237,7 @@ namespace Rei.Fs.IO
while (num4 <= num3)
{
object structure = Marshal.PtrToStructure(ptr, typeof (Win32Native.SHARE_INFO_0));
Win32Native.SHARE_INFO_0 shareInfo0_1;
Win32Native.SHARE_INFO_0 shareInfo0_1=new Win32Native.SHARE_INFO_0();
Win32Native.SHARE_INFO_0 shareInfo0_2 = structure != null ? (Win32Native.SHARE_INFO_0) structure : shareInfo0_1;
stringList.Add(shareInfo0_2.shi0_netname);
ptr = new IntPtr(checked (ptr.ToInt32() + num1));
@@ -269,7 +269,7 @@ namespace Rei.Fs.IO
}
else
{
uint dwDesiredAccess;
uint dwDesiredAccess=0;
if (access == FileAccess.Read)
dwDesiredAccess = 2147483648U;
else if (access == FileAccess.Write)
@@ -357,7 +357,7 @@ namespace Rei.Fs.IO
public static void DeleteFile(string path, bool recursive)
{
string str1 = FileSystem.NormalizePath(path);
bool isdirectory;
bool isdirectory=false;
if (!FileSystem.FileOrDirectoryExists(str1, ref isdirectory))
throw new FileNotFoundException();
if (!isdirectory)
@@ -416,10 +416,10 @@ namespace Rei.Fs.IO
{
string str1 = FileSystem.NormalizePath(path1);
string str2 = FileSystem.NormalizePath(path2);
bool isdirectory1;
bool isdirectory1 = false;
if (!FileSystem.FileOrDirectoryExists(str1, ref isdirectory1))
throw new FileNotFoundException();
bool isdirectory2;
bool isdirectory2 = false;
if (!overwrite && FileSystem.FileOrDirectoryExists(str2, ref isdirectory2))
FileSystem.RaiseError(str2, 183);
if (!isdirectory1)