Skip to content

Commit 4b3514e

Browse files
committed
Fix uncaught exceptions during cleanup
XP xar support holds on to file handles
1 parent 3bf4ccb commit 4b3514e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/test/php/lang/ast/unittest/cli/ToArchiveTest.class.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php namespace lang\ast\unittest\cli;
22

3-
use io\{File, Folder};
3+
use io\{File, Folder, IOException};
44
use lang\Environment;
55
use lang\archive\ArchiveClassLoader;
66
use test\{After, Assert, Before, Test};
@@ -22,7 +22,11 @@ public function folder() {
2222
#[After]
2323
public function cleanup() {
2424
$this->archive->isOpen() && $this->archive->close();
25-
$this->folder->unlink();
25+
try {
26+
$this->folder->unlink();
27+
} catch (IOException $ignored) {
28+
// XP xar support holds on to file handles
29+
}
2630
}
2731

2832
#[Test]

0 commit comments

Comments
 (0)