From df7aaf633aab40ebf15084e4063473030524a6f8 Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 11 May 2020 15:28:19 -0400 Subject: [PATCH] Don't rename folder if it's only a case change --- .../java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt index 8702bbf3e2..dad905dd54 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt @@ -13,6 +13,7 @@ import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.util.storage.DiskUtil import uy.kohesive.injekt.injectLazy +import java.util.Locale /** * This class is used to provide the directories where the downloads should be saved. @@ -129,6 +130,7 @@ class DownloadProvider(private val context: Context) { } fun renameMangaFolder(from: String, to: String, sourceId: Long) { + if (from.toLowerCase(Locale.getDefault()) == to.toLowerCase(Locale.getDefault())) return val sourceManager by injectLazy() val source = sourceManager.get(sourceId) ?: return val sourceDir = findSourceDir(source)