mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:14:37 +02:00
Disk (Linux): fix fastfetch doesn't show Windows drives (/mnt/c)
This commit is contained in:
@@ -17,14 +17,6 @@
|
||||
|
||||
static bool isPhysicalDevice(FFstrbuf* device)
|
||||
{
|
||||
struct stat deviceStat;
|
||||
if(stat(device->chars, &deviceStat) != 0)
|
||||
return false;
|
||||
|
||||
//Ignore all devices that are not block devices
|
||||
if(!S_ISBLK(deviceStat.st_mode))
|
||||
return false;
|
||||
|
||||
//DrvFs is a filesystem plugin to WSL that was designed to support interop between WSL and the Windows filesystem.
|
||||
if(ffStrbufEqualS(device, "drvfs"))
|
||||
return true;
|
||||
@@ -33,6 +25,14 @@ static bool isPhysicalDevice(FFstrbuf* device)
|
||||
if(ffStrbufStartsWithS(device, "rpool/"))
|
||||
return true;
|
||||
|
||||
struct stat deviceStat;
|
||||
if(stat(device->chars, &deviceStat) != 0)
|
||||
return false;
|
||||
|
||||
//Ignore all devices that are not block devices
|
||||
if(!S_ISBLK(deviceStat.st_mode))
|
||||
return false;
|
||||
|
||||
//Pseudo filesystems don't have a device in /dev
|
||||
if(!ffStrbufStartsWithS(device, "/dev/"))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user