fix(shared): validate tar hard-link targets during preflight
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -78,15 +78,15 @@ function parseTarEntry(line: string): ArchiveEntry | null {
|
||||
}
|
||||
|
||||
const [, rawType, rawEntryPath] = match
|
||||
if (rawType === "l") {
|
||||
if (rawType === "l" || rawType === "h") {
|
||||
const arrowIndex = rawEntryPath.lastIndexOf(" -> ")
|
||||
if (arrowIndex === -1) {
|
||||
return { path: rawEntryPath, type: "symlink" }
|
||||
return { path: rawEntryPath, type: rawType === "l" ? "symlink" : "hardlink" }
|
||||
}
|
||||
|
||||
return {
|
||||
path: rawEntryPath.slice(0, arrowIndex),
|
||||
type: "symlink",
|
||||
type: rawType === "l" ? "symlink" : "hardlink",
|
||||
linkPath: rawEntryPath.slice(arrowIndex + 4),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user