Bläddra i källkod

NTFileSystemAdapter: Delete related logging improvements

Tal Aloni 8 år sedan
förälder
incheckning
198443b304

+ 1 - 1
SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.Set.cs

@@ -89,8 +89,8 @@ namespace SMBLibrary
 
                     try
                     {
-                        Log(Severity.Information, "SetFileInformation: Deleting file '{0}'", fileHandle.Path);
                         m_fileSystem.Delete(fileHandle.Path);
+                        Log(Severity.Information, "SetFileInformation: Deleted '{0}'", fileHandle.Path);
                     }
                     catch (Exception ex)
                     {

+ 2 - 1
SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.cs

@@ -292,11 +292,12 @@ namespace SMBLibrary
             {
                 try
                 {
-                    Log(Severity.Verbose, "CloseFile: Deleting '{0}'.", fileHandle.Path);
                     m_fileSystem.Delete(fileHandle.Path);
+                    Log(Severity.Verbose, "CloseFile: Deleted '{0}'.", fileHandle.Path);
                 }
                 catch
                 {
+                    Log(Severity.Verbose, "CloseFile: Error deleting '{0}'.", fileHandle.Path);
                 }
             }
             return NTStatus.STATUS_SUCCESS;