mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
Disk(Linux): Use mountpoint as last fallback for disk name
This commit is contained in:
@@ -28,6 +28,7 @@ Features:
|
||||
* Optimise font module printing (Windows)
|
||||
* Detect pacman package count inside MSYS2 environment (Windows)
|
||||
* Add Wifi / Battery module support for Android
|
||||
* Disk name support for Linux
|
||||
|
||||
Logos:
|
||||
* Raspbian (@IamNoRobot, #373)
|
||||
|
||||
@@ -116,6 +116,10 @@ static void detectName(FFDisk* disk, const FFstrbuf* device)
|
||||
detectNameFromPath(disk, &deviceStat, &basePath);
|
||||
}
|
||||
|
||||
//Use the mountpoint as a last resort
|
||||
if(disk->name.length == 0)
|
||||
ffStrbufAppend(&disk->name, &disk->mountpoint);
|
||||
|
||||
ffStrbufDestroy(&basePath);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user