Skip to content

Commit

Permalink
fix Applications dir dependency (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
AriaMoradi authored Apr 16, 2022
1 parent 50f4532 commit a889214
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions server/src/main/kotlin/suwayomi/tachidesk/server/ServerSetup.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ val androidCompat by lazy { AndroidCompat() }
fun applicationSetup() {
logger.info("Running Tachidesk ${BuildConfig.VERSION} revision ${BuildConfig.REVISION}")

// register Tachidesk's config which is dubbed "ServerConfig"
GlobalConfigManager.registerModule(
ServerConfig.register(GlobalConfigManager.config)
)

// Application dirs
val applicationDirs = ApplicationDirs()

Expand All @@ -69,7 +74,6 @@ fun applicationSetup() {
// Migrate Directories from old versions
File("$ApplicationRootDir/manga-thumbnails").renameTo(applicationDirs.thumbnailsRoot)
File("$ApplicationRootDir/manga-local").renameTo(applicationDirs.localMangaRoot)
File("$ApplicationRootDir/manga").renameTo(applicationDirs.mangaDownloadsRoot)
File("$ApplicationRootDir/anime-thumbnails").delete()

// make dirs we need
Expand All @@ -84,11 +88,6 @@ fun applicationSetup() {
File(it).mkdirs()
}

// register Tachidesk's config which is dubbed "ServerConfig"
GlobalConfigManager.registerModule(
ServerConfig.register(GlobalConfigManager.config)
)

// Make sure only one instance of the app is running
handleAppMutex()

Expand Down

0 comments on commit a889214

Please sign in to comment.