From d8acadf2d727f51c5e887fea67a8640ce9dfd9e7 Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Sun, 4 Jul 2021 14:19:00 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=89=AB=E6=8F=8F=E9=9F=B3=E4=B9=90?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B9=E5=86=85=E9=83=A8=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=90=AB=E6=9C=89+=E5=8F=B7=E7=9A=84?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yutou/nas/Services/impl/MusicToolsServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java b/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java index 644c0fa..afea16b 100644 --- a/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java +++ b/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java @@ -114,11 +114,12 @@ public class MusicToolsServiceImpl implements IMusicToolsService { MusicDataExample example = new MusicDataExample(); String replacement = "windows".equals(ConfigTools.load(ConfigTools.CONFIG, "os")) ? "\\\\" : "/"; String tmpPath = path; - if (new File(path).isDirectory()) { + if (isDir) { example.createCriteria().andFileLike(tmpPath.replace(File.separator, replacement) + "%"); main = musicDataDao.selectByExample(example); } tmpPath = tmpPath.replace(File.separator, replacement) + .replace("+", "\\+") .replace("[", "\\[") .replace("(", "\\(") .replace(")", "\\)")