Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vminitd/Sources/vminitd/Server+GRPC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ extension Initd: Com_Apple_Containerization_Sandbox_V3_SandboxContextAsyncProvid
return []
}
let destURL = URL(fileURLWithPath: path)
try FileManager.default.createDirectory(at: destURL, withIntermediateDirectories: true)
try FileManager.default.createDirectory(at: destURL, withIntermediateDirectories: request.createParents)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this should remain withIntermediateDirectories: true. We already make parent directories in L414. Directory here is to unpack the tar archive.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't do the retry-based approach in container#1190 without this because the CLI needs the first copyIn(src, dst/basename, createParents=false) to fail if dst doesn't exist.
If withIntermediateDirectories is always true, the createDirectory creates dst as a side effect, the copy lands at the wrong path and the error-based retry never triggers

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We are stuck :(
Sorry for taking up your time. We'll think it over a bit more and let you know once we've decided on a direction.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, take your time. Just let me know once you've settled on a direction :)


let fileHandle = FileHandle(fileDescriptor: sockFd, closeOnDealloc: false)
let reader = try ArchiveReader(format: .pax, filter: .gzip, fileHandle: fileHandle)
Expand Down
Loading