mirror of
https://github.com/flucont/btcloud.git
synced 2025-02-02 09:48:13 -05:00
fix unlink
This commit is contained in:
parent
23b52ec3f7
commit
a3eafecde5
@ -183,7 +183,7 @@ class Plugins
|
|||||||
self::download_file($btapi, $filename, $filepath);
|
self::download_file($btapi, $filename, $filepath);
|
||||||
if(file_exists($filepath)){
|
if(file_exists($filepath)){
|
||||||
if($filemd5 && md5_file($filepath) != $filemd5){
|
if($filemd5 && md5_file($filepath) != $filemd5){
|
||||||
unlink($filepath);
|
@unlink($filepath);
|
||||||
throw new Exception('插件文件MD5校验失败');
|
throw new Exception('插件文件MD5校验失败');
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -203,7 +203,7 @@ class Plugins
|
|||||||
try{
|
try{
|
||||||
$btapi->download($filename, $filepath);
|
$btapi->download($filename, $filepath);
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
unlink($filepath);
|
@unlink($filepath);
|
||||||
//宝塔bug小文件下载失败,改用base64下载
|
//宝塔bug小文件下载失败,改用base64下载
|
||||||
$result = $btapi->get_file($filename);
|
$result = $btapi->get_file($filename);
|
||||||
if($result && isset($result['status']) && $result['status']==true){
|
if($result && isset($result['status']) && $result['status']==true){
|
||||||
|
Loading…
Reference in New Issue
Block a user