Skip to content

Commit b3b287e

Browse files
author
Yudhiesh Ravindranath
committed
fix: support old and new local directory path
1 parent 38ff151 commit b3b287e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/clickhouse/clickhouse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ func (ch *ClickHouse) GetAccessManagementPath(ctx context.Context, disks []Disk)
11391139
rows := make([]struct {
11401140
AccessPath string `ch:"access_path"`
11411141
}, 0)
1142-
if err := ch.SelectContext(ctx, &rows, "SELECT JSONExtractString(params,'path') AS access_path FROM system.user_directories WHERE type='local_directory'"); err != nil || len(rows) == 0 {
1142+
if err := ch.SelectContext(ctx, &rows, "SELECT JSONExtractString(params,'path') AS access_path FROM system.user_directories WHERE type in ('local_directory','local directory')"); err != nil || len(rows) == 0 {
11431143
configFile, doc, err := ch.ParseXML(ctx, "config.xml")
11441144
if err != nil {
11451145
log.Warn().Msgf("can't parse config.xml from %s, error: %v", configFile, err)

0 commit comments

Comments
 (0)