浏览代码

fix: normalize name path before splitting

Michael Yang 1 年之前
父节点
当前提交
96cfb62641
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      server/modelpath.go

+ 1 - 0
server/modelpath.go

@@ -46,6 +46,7 @@ func ParseModelPath(name string) ModelPath {
 		name = after
 	}
 
+	name = strings.ReplaceAll(name, string(os.PathSeparator), "/")
 	parts := strings.Split(name, "/")
 	switch len(parts) {
 	case 3: