fix: dependency scan ignores folders above the game folder (#859)

This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-10-15 07:03:17 -04:00
1 parent d3b0b8e51c
commit 9e7b4c0b50
2 files changed
+19 -1

No files matched your search

@@ -0,0 +1,18 @@
package com.droiddeck.launcher.frontend
import java.io.File
import org.junit.Assert.assertEquals
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TemporaryFolder
class DependencyDetectorTest {
@get:Rule val tmp = TemporaryFolder()
@Test fun foldersAboveTheGameDoNotChangeWhatIsFound() {
val folder = File(tmp.newFolder("Games 2005", "agility"), "Game")
File(folder, "_CommonRedist/vcredist/2013").mkdirs()
File(folder, "_CommonRedist/vcredist/2013/vcredist_x64.exe").writeText("x")
assertEquals(listOf("vcredist2013"), DependencyDetector.detect(folder).map { it.componentName })
}
}