Skip to content

Commit ff97ee4

Browse files
committed
fix: Use non-OS specific path separator for constructing size file path for NBD device
1 parent 6c1db61 commit ff97ee4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/client/nbd.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"io"
88
"net"
99
"os"
10-
"path"
1110
"path/filepath"
1211
"strconv"
1312
"strings"
@@ -131,7 +130,7 @@ func Connect(conn net.Conn, device *os.File, options *Options) error {
131130
}()
132131
} else {
133132
go func() {
134-
sizeFile, err := os.Open(path.Join("/sys", "block", filepath.Base(device.Name()), "size"))
133+
sizeFile, err := os.Open(filepath.Join("/sys", "block", filepath.Base(device.Name()), "size"))
135134
if err != nil {
136135
fatal <- err
137136

0 commit comments

Comments
 (0)