Skip to content

Commit c4ec56a

Browse files
committed
Merge pull request docker-archive#26 from crosbymichael/device-copy-links
Use lstat to check device symlinks
2 parents e00eadd + bbb502c commit c4ec56a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

devices/devices.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ func (device *Device) GetCgroupAllowString() string {
3939
}
4040

4141
// Given the path to a device and it's cgroup_permissions(which cannot be easilly queried) look up the information about a linux device and return that information as a Device struct.
42-
func GetDevice(path string, cgroupPermissions string) (*Device, error) {
43-
fileInfo, err := os.Stat(path)
42+
func GetDevice(path, cgroupPermissions string) (*Device, error) {
43+
fileInfo, err := os.Lstat(path)
4444
if err != nil {
4545
return nil, err
4646
}

0 commit comments

Comments
 (0)