Merge pull request #70 from qkqpttgf/master

try fix file content
pull/98/head
Mr.Lin 2020-04-10 22:51:48 +08:00 committed by GitHub
commit 010f13e91e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -1112,6 +1112,15 @@ function fetch_files($path = '/')
savecache('path_' . $path, $files); savecache('path_' . $path, $files);
} }
} }
if (isset($files['file'])) {
if (in_array(splitlast($files['name'],'.')[1], $exts['txt'])) {
if (!(isset($files['content'])&&$files['content']['stat']==200)) {
$content1 = curl_request($files[$_SERVER['DownurlStrName']]);
$files['content'] = $content1;
savecache('path_' . $path, $files);
}
}
}
if (isset($files['error'])) { if (isset($files['error'])) {
$files['error']['stat'] = $arr['stat']; $files['error']['stat'] = $arr['stat'];
} }