Merge pull request #4123 from warwickmm/fix_block_device_type
Fix detection of block devices in UnixSupport.File.GetFileType
This commit is contained in:
Vendored
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user