Skip to content

Commit c4be222

Browse files
committed
* Minor code improvements
1 parent e3c6dec commit c4be222

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

DeadLock/Classes/LanguageManager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.IO;
2-
using System.Text;
32
using System.Xml.Serialization;
43

54
namespace DeadLock.Classes

DeadLock/Classes/ListViewLocker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ internal void SetOwnership(bool owned)
163163
WindowsIdentity self = WindowsIdentity.GetCurrent();
164164
DirectorySecurity ds = info.GetAccessControl();
165165
ds.SetAccessRuleProtection(false, true);
166-
if (self?.User == null) return;
166+
if (self.User == null) return;
167167
if (ds.GetOwner(typeof(NTAccount)).ToString() != self.Name)
168168
{
169169
ds.SetOwner(self.User);
@@ -176,7 +176,7 @@ internal void SetOwnership(bool owned)
176176
WindowsIdentity self = WindowsIdentity.GetCurrent();
177177
FileSecurity fs = File.GetAccessControl(GetPath());
178178
fs.SetAccessRuleProtection(false, true);
179-
if (self?.User == null) return;
179+
if (self.User == null) return;
180180
if (fs.GetOwner(typeof(NTAccount)).ToString() != self.Name)
181181
{
182182
fs.SetOwner(self.User);

0 commit comments

Comments
 (0)