Skip to content

Commit eadd494

Browse files
committed
- temp disable native mac file utils
- fix test warnings
1 parent 916296f commit eadd494

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/mediathek/tool/FileUtils.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package mediathek.tool
22

3-
import mediathek.mac.MacFileUtils
43
import mediathek.windows.WindowsFileUtils
54
import org.apache.commons.lang3.SystemUtils
65
import java.io.File
@@ -20,7 +19,8 @@ object FileUtils {
2019
@JvmStatic
2120
fun moveToTrash(filePath: Path) {
2221
if (SystemUtils.IS_OS_MAC_OSX) {
23-
MacFileUtils.moveToTrash(filePath.toFile())
22+
//MacFileUtils.moveToTrash(filePath.toFile())
23+
Files.deleteIfExists(filePath)
2424
}
2525
else if (SystemUtils.IS_OS_WINDOWS) {
2626
WindowsFileUtils.moveToTrash(filePath.toFile())

src/test/java/mediathek/tool/SeenHistoryMigratorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ void testDbContent() throws SQLException {
7474
rs.next();
7575
var count = rs.getInt(1);
7676
//we must have one return
77-
assertEquals(count, 1);
77+
assertEquals(1, count);
7878
rs.close();
7979

8080
testSql = "SELECT COUNT(*) as total FROM seen_history";
8181
rs = statement.executeQuery(testSql);
8282
rs.next();
8383
count = rs.getInt(1);
8484
// there must be 8 entries in db
85-
assertEquals(count, 8);
85+
assertEquals(8, count);
8686
rs.close();
8787
}
8888
}

0 commit comments

Comments
 (0)