Skip to content

Commit 9f1b569

Browse files
committed
Add comment about tmp path
1 parent 33c5245 commit 9f1b569

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/DocUploader/DocUploader.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ public struct DocUploader: LambdaHandler {
8383
logger.info("record: \(record)")
8484

8585
try await run {
86+
// When Lambdas are run in quick succession they seem to be seeing the same /tmp file system and unzipping can fail with
87+
// lambda handler returned an error: Error Domain=NSCocoaErrorDomain Code=516 "A file with the same name already exists."
8688
let outputPath = "/tmp/\(UUID())"
8789
try Foundation.FileManager.default.createDirectory(at: URL(fileURLWithPath: outputPath), withIntermediateDirectories: true)
8890

0 commit comments

Comments
 (0)