Update Onedrive.php

pull/686/head
asoul-rec 2023-04-20 08:33:32 -04:00 committed by GitHub
parent 0e1d0b8a10
commit 5bcbb76a9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -62,7 +62,7 @@ class Onedrive {
//savecache('path_' . $parentpath, $parentfiles, $this->disktag); //savecache('path_' . $parentpath, $parentfiles, $this->disktag);
if ($parentfiles['children'][$filename]['size']<1024*1024) { if ($parentfiles['children'][$filename]['size']<1024*1024) {
if (!(isset($parentfiles['children'][$filename]['content'])&&$parentfiles['children'][$filename]['content']['stat']==200)) { if (!(isset($parentfiles['children'][$filename]['content'])&&$parentfiles['children'][$filename]['content']['stat']==200)) {
$content1 = curl('GET', $parentfiles['children'][$filename][$this->DownurlStrName]); $content1 = curl('GET', $parentfiles['children'][$filename][$this->DownurlStrName], '', [], 0, 1);
$tmp = null; $tmp = null;
$tmp = json_decode(json_encode($content1), true); $tmp = json_decode(json_encode($content1), true);
if ($tmp['body']===null) { if ($tmp['body']===null) {
@ -121,10 +121,7 @@ class Onedrive {
if (in_array(strtolower(splitlast($files['name'],'.')[1]), $exts['txt'])) { if (in_array(strtolower(splitlast($files['name'],'.')[1]), $exts['txt'])) {
if ($files['size']<1024*1024) { if ($files['size']<1024*1024) {
if (!(isset($files['content'])&&$files['content']['stat']==200)) { if (!(isset($files['content'])&&$files['content']['stat']==200)) {
$content1 = curl('GET', $files[$this->DownurlStrName], '', [], 1); $content1 = curl('GET', $files[$this->DownurlStrName], '', [], 0, 1);
if ($content1['stat'] == 302) {
$content1 = curl('GET', $content1["returnhead"]["location"]);
}
$tmp = null; $tmp = null;
$tmp = json_decode(json_encode($content1), true); $tmp = json_decode(json_encode($content1), true);
if ($tmp['body']===null) { if ($tmp['body']===null) {