File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed
Sources/Overlays/_Testing_Foundation/Attachments Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -17,21 +17,6 @@ private import WinSDK
1717#endif
1818
1919#if !SWT_NO_FILE_IO
20- extension URL {
21- /// The file system path of the URL, equivalent to `path`.
22- var fileSystemPath : String {
23- #if os(Windows)
24- // BUG: `path` includes a leading slash which makes it invalid on Windows.
25- // SEE: https://github.com/swiftlang/swift-foundation/pull/964
26- let path = path
27- if path. starts( with: /\/ [ A- Za- z] : \//) {
28- return String( path. dropFirst ( ) )
29- }
30- #endif
31- return path
32- }
33- }
34-
3520extension Attachment where AttachableValue == _AttachableURLWrapper {
3621#if SWT_TARGET_OS_APPLE
3722 /// An operation queue to use for asynchronously reading data from disk.
@@ -203,8 +188,8 @@ private func _compressContentsOfDirectory(at directoryURL: URL) async throws ->
203188 throw CocoaError ( . featureUnsupported, userInfo: [ NSLocalizedDescriptionKey: " This platform does not support attaching directories to tests. " ] )
204189#endif
205190
206- let sourcePath = directoryURL. fileSystemPath
207- let destinationPath = temporaryURL. fileSystemPath
191+ let sourcePath = directoryURL. path
192+ let destinationPath = temporaryURL. path
208193 let arguments = {
209194#if os(Linux) || os(OpenBSD)
210195 // The zip command constructs relative paths from the current working
You can’t perform that action at this time.
0 commit comments