From d521ec404b4e34863f0eeb7a841319acb5afd6c2 Mon Sep 17 00:00:00 2001 From: mengze zhu Date: Fri, 6 Sep 2024 03:29:30 +0000 Subject: [PATCH] fix typo --- pkg/smb/controllerserver.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/smb/controllerserver.go b/pkg/smb/controllerserver.go index 30a2ad7156a..e933aa1b4ee 100644 --- a/pkg/smb/controllerserver.go +++ b/pkg/smb/controllerserver.go @@ -207,7 +207,7 @@ func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) parentDir := filepath.Dir(archivedInternalVolumePath) klog.V(2).Infof("DeleteVolume: subdirectory(%s) contains '/', make sure the parent directory(%s) exists", smbVol.subDir, parentDir) if err = os.MkdirAll(parentDir, 0777); err != nil { - return nil, status.Errorf(codes.Internal, "create parent directory(%s) of %s failed with %v", parentDir, archivedInternalVolumePath, err)) + return nil, status.Errorf(codes.Internal, "create parent directory(%s) of %s failed with %v", parentDir, archivedInternalVolumePath, err) } } @@ -216,7 +216,7 @@ func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) if d.removeArchivedVolumePath { klog.V(2).Infof("removing archived subdirectory at %v", archivedInternalVolumePath) if err = os.RemoveAll(archivedInternalVolumePath); err != nil { - return nil, status.Errorf(codes.Internal, "failed to delete archived subdirectory %s: %v", archivedInternalVolumePath, error) + return nil, status.Errorf(codes.Internal, "failed to delete archived subdirectory %s: %v", archivedInternalVolumePath, err) } klog.V(2).Infof("removed archived subdirectory at %v", archivedInternalVolumePath) }