This commit is contained in:
david 2022-10-06 01:47:53 +08:00
parent 66b7f45e52
commit 668aef26f8
2 changed files with 9 additions and 7 deletions

View File

@ -33,15 +33,17 @@ class Config
clearstatcache(); clearstatcache();
$file_name = $absolutePath ? $filename : static::createFilePath($filename, $type); $file_name = $absolutePath ? $filename : static::createFilePath($filename, $type);
if (!is_writable(dirname($file_name))) { $dir = dirname($file_name);
is_dir($dir) or mkdir($dir, 0777, true);
if (!is_writable($dir)) {
return false; return false;
} }
if (file_exists($file_name)) {
if (!file_exists($file_name)) {
touch($file_name);
chmod($file_name, 0777); chmod($file_name, 0777);
} else {
$dir = dirname($file_name);
is_dir($dir) or mkdir($dir, 0777, true);
} }
switch (strtolower($type)) { switch (strtolower($type)) {
case 'object': case 'object':
$str = serialize($data); $str = serialize($data);

View File

@ -16,8 +16,8 @@
- [x] 辅种任务自动校验 - [x] 辅种任务自动校验
- [x] 辅种任务自动开始做种 - [x] 辅种任务自动开始做种
- [ ] 一键导入PT助手的cookie配置 - [ ] 一键导入PT助手的cookie配置
- [ ] 停止执行中的计划任务 - [x] 停止执行中的计划任务
- [ ] 前端实时显示任务运行状态Ajax - [x] 前端实时显示任务运行状态Ajax
- [ ] 替换tracker - [ ] 替换tracker
- [ ] 检查做种任务与数据对应关系 - [ ] 检查做种任务与数据对应关系
- [ ] 增量更新漏掉的种子 - [ ] 增量更新漏掉的种子