File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,11 @@ fileprivate class CommandLineArgumentReducer {
34
34
35
35
init ( sourcekitdExecutor: SourceKitRequestExecutor ) {
36
36
self . sourcekitdExecutor = sourcekitdExecutor
37
- temporarySourceFile = FileManager . default. temporaryDirectory. appendingPathComponent ( " reduce.swift " )
37
+ temporarySourceFile = FileManager . default. temporaryDirectory. appendingPathComponent ( " reduce- \( UUID ( ) ) .swift " )
38
+ }
39
+
40
+ deinit {
41
+ try ? FileManager . default. removeItem ( at: temporarySourceFile)
38
42
}
39
43
40
44
func logSuccessfulReduction( _ requestInfo: RequestInfo ) {
Original file line number Diff line number Diff line change @@ -65,7 +65,11 @@ fileprivate class SourceReducer {
65
65
66
66
init ( sourcekitdExecutor: SourceKitRequestExecutor ) {
67
67
self . sourcekitdExecutor = sourcekitdExecutor
68
- temporarySourceFile = FileManager . default. temporaryDirectory. appendingPathComponent ( " reduce.swift " )
68
+ temporarySourceFile = FileManager . default. temporaryDirectory. appendingPathComponent ( " reduce- \( UUID ( ) ) .swift " )
69
+ }
70
+
71
+ deinit {
72
+ try ? FileManager . default. removeItem ( at: temporarySourceFile)
69
73
}
70
74
71
75
/// Reduce the file contents in `initialRequest` to a smaller file that still reproduces a crash.
You can’t perform that action at this time.
0 commit comments