Merge pull request #4123 from warwickmm/fix_block_device_type

Fix detection of block devices in UnixSupport.File.GetFileType
This commit is contained in:
Kenneth Skovhede
2020-03-25 06:58:58 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+2 -2
View File
@@ -159,7 +159,7 @@ namespace UnixSupport
/// <param name="path">The full path to look up</param>
public static FileType GetFileType(string path)
{
var fse = Mono.Unix.UnixFileInfo.GetFileSystemEntry(path);
if (fse.IsRegularFile)
return FileType.File;
@@ -174,7 +174,7 @@ namespace UnixSupport
else if (fse.IsCharacterDevice)
return FileType.CharacterDevice;
else if (fse.IsBlockDevice)
return FileType.CharacterDevice;
return FileType.BlockDevice;
else
return FileType.Unknown;
}
Vendored Executable → Regular
BIN
View File
Binary file not shown.