{"record":{"id":"85ff4d297172d545","repo":"goharbor/harbor","slug":"path-conflicts-s-exists-with-different-type","errorCode":null,"errorMessage":"path conflicts: %s exists with different type","messagePattern":"path conflicts: (.+?) exists with different type","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/controller/artifact/processor/cnai/parser/util.go","lineNumber":192,"sourceCode":"\t\t\t\t\tnewNode = NewFile(part, size)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnewNode = NewDirectory(part)\n\t\t\t}\n\n\t\t\tif err := current.AddChild(newNode); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tcurrent = newNode\n\t\t} else {\n\t\t\tchild.mu.RLock()\n\t\t\tnodeType := child.Type\n\t\t\tchild.mu.RUnlock()\n\n\t\t\tif isLastPart {\n\t\t\t\tif (isDir && nodeType != TypeDirectory) || (!isDir && nodeType != TypeFile) {\n\t\t\t\t\treturn nil, fmt.Errorf(\"path conflicts: %s exists with different type\", part)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcurrent = child\n\t\t}\n\t}\n\n\treturn current, nil\n}\n","sourceCodeStart":174,"sourceCodeEnd":202,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/controller/artifact/processor/cnai/parser/util.go#L174-L202","documentation":"Error \"path conflicts: %s exists with different type\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/controller/artifact/processor/cnai/parser/util.go:192 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}