From ccfd54da15d00e07d982f5a193050c946c15ac6e Mon Sep 17 00:00:00 2001 From: AndreiIOS Date: Sat, 6 Apr 2019 16:22:51 +0300 Subject: [PATCH] play sound from folder --- Source/Sound.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Sound.swift b/Source/Sound.swift index a5a4821..84ee0ae 100644 --- a/Source/Sound.swift +++ b/Source/Sound.swift @@ -80,7 +80,7 @@ public class Sound : NSObject, Playable { super.init() let urlName = URL(fileURLWithPath: fileName) - let file = urlName.deletingPathExtension().lastPathComponent + let file = urlName.deletingPathExtension().path let fileExtension = urlName.pathExtension name = fileName