{"record":{"id":"5c399b4fa8c10643","repo":"vxcontrol/pentagi","slug":"relative-path-w-5c399b","errorCode":null,"errorMessage":"relative path: %w","messagePattern":"relative path: %w","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"backend/pkg/server/services/flow_files.go","lineNumber":1890,"sourceCode":"\t\tif src.isDir {\n\t\t\ttopLevelDirs = append(topLevelDirs, src.destPath)\n\t\t}\n\n\t\twalkErr := filepath.Walk(src.absPath, func(filePath string, fi os.FileInfo, err error) error {\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\t// filepath.Walk uses Lstat → symlinks and special files are NOT\n\t\t\t// regular and are skipped here (defense-in-depth).\n\t\t\tif !fi.Mode().IsRegular() {\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\tvar virtPath string\n\t\t\tif src.isDir {\n\t\t\t\trel, relErr := filepath.Rel(src.absPath, filePath)\n\t\t\t\tif relErr != nil {\n\t\t\t\t\treturn fmt.Errorf(\"relative path: %w\", relErr)\n\t\t\t\t}\n\t\t\t\tsanitized, sanitizeErr := resources.SanitizeResourcePath(\n\t\t\t\t\tsrc.destPath + \"/\" + filepath.ToSlash(rel),\n\t\t\t\t)\n\t\t\t\tif sanitizeErr != nil {\n\t\t\t\t\tlog.WithError(sanitizeErr).Warnf(\"skipping unsafe file name %q\", rel)\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t\tvirtPath = sanitized\n\t\t\t} else {\n\t\t\t\tvirtPath = src.destPath\n\t\t\t}\n\n\t\t\t// Within-batch collision check: two sources mapping to the same\n\t\t\t// virtual destination path is always an error.\n\t\t\tif seenVPaths[virtPath] {\n\t\t\t\treturn fmt.Errorf(\"%w: two sources both target %q\", errResourceConflict, virtPath)\n\t\t\t}","sourceCodeStart":1872,"sourceCodeEnd":1908,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/server/services/flow_files.go#L1872-L1908","documentation":"Error \"relative path: %w\" thrown in vxcontrol/pentagi.","triggerScenarios":"Thrown at backend/pkg/server/services/flow_files.go:1890 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":"ea665308baaff015b226f308438a68d929d0f29b","analyzedAt":"2026-09-01T14:16:31.421Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}