diff --git a/SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.QueryDirectory.cs b/SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.QueryDirectory.cs index 66a2ffb..07b767f 100644 --- a/SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.QueryDirectory.cs +++ b/SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.QueryDirectory.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2014-2017 Tal Aloni . All rights reserved. +/* Copyright (C) 2014-2018 Tal Aloni . All rights reserved. * * You can redistribute this program and/or modify it under the terms of * the GNU Lesser Public License as published by the Free Software Foundation, @@ -183,7 +183,6 @@ namespace SMBLibrary result.AllocationSize = (long)GetAllocationSize(entry.Size); result.FileAttributes = GetFileAttributes(entry); result.EaSize = 0; - result.ShortName = GetShortName(entry.Name); result.FileName = entry.Name; return result; } @@ -225,7 +224,6 @@ namespace SMBLibrary result.AllocationSize = (long)GetAllocationSize(entry.Size); result.FileAttributes = GetFileAttributes(entry); result.EaSize = 0; - result.ShortName = GetShortName(entry.Name); result.FileId = 0; result.FileName = entry.Name; return result; diff --git a/SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.cs b/SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.cs index 3c59510..46a78b3 100644 --- a/SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.cs +++ b/SMBLibrary/NTFileStore/Adapter/NTFileSystemAdapter.cs @@ -555,29 +555,5 @@ namespace SMBLibrary { return (ulong)Math.Ceiling((double)size / ClusterSize) * ClusterSize; } - - public static string GetShortName(string fileName) - { - string fileNameWithoutExt = System.IO.Path.GetFileNameWithoutExtension(fileName); - string extension = System.IO.Path.GetExtension(fileName); - if (fileNameWithoutExt.Length > 8 || extension.Length > 4) - { - if (fileNameWithoutExt.Length > 8) - { - fileNameWithoutExt = fileNameWithoutExt.Substring(0, 8); - } - - if (extension.Length > 4) - { - extension = extension.Substring(0, 4); - } - - return fileNameWithoutExt + extension; - } - else - { - return fileName; - } - } } }