Skip to content

Commit 8fc5eac

Browse files
committed
fix: use Lstat instead of Stat in NodeGetVolumeStats
fix comment
1 parent d298cb8 commit 8fc5eac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/smb/nodeserver.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,7 @@ func (d *Driver) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeS
256256
return nil, status.Error(codes.InvalidArgument, "NodeGetVolumeStats volume path was empty")
257257
}
258258

259-
_, err := os.Stat(req.VolumePath)
260-
if err != nil {
259+
if _, err := os.Lstat(req.VolumePath); err != nil {
261260
if os.IsNotExist(err) {
262261
return nil, status.Errorf(codes.NotFound, "path %s does not exist", req.VolumePath)
263262
}

0 commit comments

Comments
 (0)