File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1390,11 +1390,7 @@ extension FileManager {
1390
1390
if options. contains ( . skipsSubdirectoryDescendants) {
1391
1391
skipDescendants = true
1392
1392
}
1393
- #if canImport(Darwin)
1394
- if options. contains ( . skipsPackageDescendants) && filename. hasSuffix ( " .app " ) {
1395
- skipDescendants = true
1396
- }
1397
- #endif
1393
+ // Ignore .skipsPackageDescendants
1398
1394
}
1399
1395
if options. contains ( . skipsHiddenFiles) && ( filename [ filename. _startOfLastPathComponent] == " . " ) {
1400
1396
showFile = false
Original file line number Diff line number Diff line change @@ -478,10 +478,10 @@ class TestFileManager : XCTestCase {
478
478
}
479
479
480
480
if let foundItems = directoryItems ( options: [ . skipsPackageDescendants] ) {
481
- #if canImport(Darwin)
482
- XCTAssertEqual ( foundItems. count, 10 )
481
+ #if DARWIN_COMPATIBILITY_TESTS
482
+ XCTAssertEqual ( foundItems. count, 10 ) // Only native Foundation does not gnore .skipsPackageDescendants
483
483
#else
484
- XCTAssertEqual ( foundItems. count, 15 ) // Non Darwin platforms ignore .skipsPackageDescendants
484
+ XCTAssertEqual ( foundItems. count, 15 )
485
485
#endif
486
486
} else {
487
487
XCTFail ( " Cant enumerate directory at \( basePath) with options: [.skipsHiddenFiles, .skipsSubdirectoryDescendants] " )
You can’t perform that action at this time.
0 commit comments