Skip to content

Commit 94fc64e

Browse files
fix build
1 parent 1e8bd3e commit 94fc64e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

disk/disk_windows.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ func PartitionsWithContext(_ context.Context, _ bool) ([]PartitionStat, error) {
115115

116116
// Get drives with drive letters (including remote drives, ex: SMB shares)
117117
drives, err := getLogicalDrives()
118-
if logicalDrivesErr != nil {
119-
return partitionStats, logicalDrivesErr
118+
if err != nil {
119+
return partitionStats, err
120120
}
121121

122122
partitionStats = processLogicalDrives(drives, processedPaths, partitionStats, warnings)
@@ -132,7 +132,7 @@ func processVolumesMountedAsFolders(partitionStats []PartitionStat, warnings War
132132
uintptr(unsafe.Pointer(&volNameBuf[0])),
133133
uintptr(maxVolumeNameLength))
134134
if windows.Handle(nextVolHandle) == windows.InvalidHandle {
135-
warnings.Add(fmt.Errorf("failed to get first-volume: %w", logicalDrivesErr))
135+
warnings.Add(fmt.Errorf("failed to get first-volume: %w", err))
136136
return partitionStats
137137
}
138138
defer procFindVolumeClose.Call(nextVolHandle)

0 commit comments

Comments
 (0)