Skip to content

Commit ff37912

Browse files
committed
publish dev tag
Signed-off-by: Ashima-Ashima1 <Ashima.Ashima1@ibm.com>
1 parent 7b1d1c0 commit ff37912

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cos-csi-mounter/server/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func pathValidator(targetPath string) error {
4141
if err != nil {
4242
return fmt.Errorf("failed to resolve absolute mount path: %v", err)
4343
}
44-
if !(strings.HasPrefix(absPath, safeMountDirs[0]) || strings.HasPrefix(absPath, safeMountDirs[1])) {
44+
if !strings.HasPrefix(absPath, safeMountDirs[0]) && !strings.HasPrefix(absPath, safeMountDirs[1]) {
4545
return fmt.Errorf("bad value for target path \"%v\"", targetPath)
4646
}
4747
return nil

0 commit comments

Comments
 (0)