From e68b3dfc8c641dce5ddce7737c866b1400cbde52 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Fri, 28 Jul 2023 09:45:22 +0700 Subject: [PATCH] another fix lol --- .../chipmunk/chayapak/chomens_bot/song/SongLoaderRunnable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/song/SongLoaderRunnable.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/song/SongLoaderRunnable.java index f9fa8b3..cad3048 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/song/SongLoaderRunnable.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/song/SongLoaderRunnable.java @@ -73,7 +73,7 @@ public class SongLoaderRunnable implements Runnable { name = Paths.get(songUrl.toURI().getPath()).getFileName().toString(); } else { bytes = Files.readAllBytes(songPath); - name = fileName; + name = !isFolder ? fileName : songPath.getFileName().toString(); } } catch (Exception e) { exception = new SongLoaderException(Component.text(e.getMessage()));