From 4311aafc0e312e05d067285c3e700d4908f22bc3 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Thu, 29 Aug 2024 14:05:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJySet.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJySet.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SrcJySet.js b/SrcJySet.js index 91ea447b..2b77fde0 100644 --- a/SrcJySet.js +++ b/SrcJySet.js @@ -1908,7 +1908,7 @@ function resource() { let input = getMyVar('importinput', '').trim(); if(input==""){ return 'toast://请先输入链接地址'; - }else if(importtype=="4" && !input.endsWith('/') && !input.startsWith('/')){ + }else if(importtype=="4" && (!input.endsWith('/') || !input.startsWith('/'))){ return 'toast://文件夹路径不正确,以/开头结尾'; } let importtype = getMyVar('importtype','1'); @@ -1939,10 +1939,10 @@ function resource() { return names; } - let oldfiles = readDir(getPath(datapath+'libs_jk/')); - log(oldfiles.length); - let newfiles = readDir(input).filter(v=>v.endsWith('.js') && oldfiles.filter(o=>o==v).length==0).map(v=>input+v); - log(newfiles); + let oldfiles = getDatas("jk").filter(v=>v.type=="hipy_t3" && v.url.startsWith(datapath)).map(v=>v.url); + log(oldfiles); + //let newfiles = readDir(input).filter(v=>v.endsWith('.js') && oldfiles.filter(o=>o==v).length==0).map(v=>input+v); + //log(newfiles); return "toast://111"; }