Skip to content

Commit dcd857a

Browse files
Ivaylogi98neddp
authored andcommitted
Remove leftover path normalization (#401)
1 parent 3d6949d commit dcd857a

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

infrastructure/devicepathresolver/aws_nvme_instance_storage_resolver.go

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package devicepathresolver
22

33
import (
4-
"path/filepath"
54
"sort"
65

76
bosherr "github.com/cloudfoundry/bosh-utils/errors"
@@ -69,22 +68,17 @@ func (r *awsNVMeInstanceStorageResolver) DiscoverInstanceStorage(devices []boshs
6968
continue
7069
}
7170

72-
// Normalize path to use forward slashes for consistent comparison
73-
// This is needed because ReadAndFollowLink may return OS-native paths
74-
normalizedPath := filepath.ToSlash(absPath)
75-
r.logger.Debug(r.logTag, "EBS volume: %s -> %s", symlink, normalizedPath)
76-
ebsDevices[normalizedPath] = true
71+
r.logger.Debug(r.logTag, "EBS volume: %s -> %s", symlink, absPath)
72+
ebsDevices[absPath] = true
7773
}
7874

7975
var instanceStorage []string
80-
for _, device := range allNvmeDevices {
81-
// Normalize device path for consistent comparison
82-
normalizedDevice := filepath.ToSlash(device)
83-
if !ebsDevices[normalizedDevice] {
84-
instanceStorage = append(instanceStorage, device)
85-
r.logger.Info(r.logTag, "Discovered instance storage: %s", device)
76+
for _, devicePath := range allNvmeDevices {
77+
if !ebsDevices[devicePath] {
78+
instanceStorage = append(instanceStorage, devicePath)
79+
r.logger.Info(r.logTag, "Discovered instance storage: %s", devicePath)
8680
} else {
87-
r.logger.Debug(r.logTag, "Excluding EBS volume: %s", device)
81+
r.logger.Debug(r.logTag, "Excluding EBS volume: %s", devicePath)
8882
}
8983
}
9084

0 commit comments

Comments
 (0)