(easy FIX)
This commit is contained in:
parent
482dca204f
commit
7269e8440d
1 changed files with 3 additions and 1 deletions
|
@ -88,7 +88,9 @@ public class SongLoaderThread extends Thread {
|
|||
try {
|
||||
if (isUrl) {
|
||||
bytes = DownloadUtilities.DownloadToByteArray(songUrl, 5 * 1024 * 1024);
|
||||
name = Paths.get(songUrl.toURI().getPath()).getFileName().toString();
|
||||
final Path fileName = Paths.get(songUrl.toURI().getPath()).getFileName();
|
||||
|
||||
name = fileName == null ? "(root)" : fileName.toString();
|
||||
} else {
|
||||
bytes = Files.readAllBytes(songPath);
|
||||
name = !isFolder ? fileName : songPath.getFileName().toString();
|
||||
|
|
Loading…
Reference in a new issue