mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 05:56:37 +00:00
logical_disk: skip unmounted volumes (#2084)
This commit is contained in:
@@ -701,6 +701,11 @@ func getAllMountedVolumes() (map[string]string, error) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if errors.Is(err, windows.ERROR_FILE_NOT_FOUND) {
|
||||||
|
// the volume is not mounted
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
if errors.Is(err, windows.ERROR_NO_MORE_FILES) {
|
if errors.Is(err, windows.ERROR_NO_MORE_FILES) {
|
||||||
rootPathBuf = make([]uint16, (rootPathLen+1)/2)
|
rootPathBuf = make([]uint16, (rootPathLen+1)/2)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user