From 5bcbb76a9f242ea9840a537a5c1970adcd96db22 Mon Sep 17 00:00:00 2001 From: asoul-rec Date: Thu, 20 Apr 2023 08:33:32 -0400 Subject: [PATCH] Update Onedrive.php --- disk/Onedrive.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/disk/Onedrive.php b/disk/Onedrive.php index ed9e0e4..a47485a 100644 --- a/disk/Onedrive.php +++ b/disk/Onedrive.php @@ -62,7 +62,7 @@ class Onedrive { //savecache('path_' . $parentpath, $parentfiles, $this->disktag); if ($parentfiles['children'][$filename]['size']<1024*1024) { 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 = json_decode(json_encode($content1), true); if ($tmp['body']===null) { @@ -121,10 +121,7 @@ class Onedrive { if (in_array(strtolower(splitlast($files['name'],'.')[1]), $exts['txt'])) { if ($files['size']<1024*1024) { if (!(isset($files['content'])&&$files['content']['stat']==200)) { - $content1 = curl('GET', $files[$this->DownurlStrName], '', [], 1); - if ($content1['stat'] == 302) { - $content1 = curl('GET', $content1["returnhead"]["location"]); - } + $content1 = curl('GET', $files[$this->DownurlStrName], '', [], 0, 1); $tmp = null; $tmp = json_decode(json_encode($content1), true); if ($tmp['body']===null) {