Browse Source

TreeConnectHelper: Improved code readability

Tal Aloni 8 years ago
parent
commit
4390f2e1a0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      SMBLibrary/Server/SMB2/TreeConnectHelper.cs

+ 2 - 1
SMBLibrary/Server/SMB2/TreeConnectHelper.cs

@@ -21,7 +21,7 @@ namespace SMBLibrary.Server.SMB2
             string shareName = ServerPathUtils.GetShareName(request.Path);
             ISMBShare share;
             ShareType shareType;
-            ShareFlags shareFlags = ShareFlags.ManualCaching;
+            ShareFlags shareFlags;
             if (String.Equals(shareName, NamedPipeShare.NamedPipeShareName, StringComparison.InvariantCultureIgnoreCase))
             {
                 share = services;
@@ -32,6 +32,7 @@ namespace SMBLibrary.Server.SMB2
             {
                 share = shares.GetShareFromName(shareName);
                 shareType = ShareType.Disk;
+                shareFlags = ShareFlags.ManualCaching;
                 if (share == null)
                 {
                     return new ErrorResponse(request.CommandName, NTStatus.STATUS_OBJECT_PATH_NOT_FOUND);