correct cachefile

This commit is contained in:
Your Name
2020-05-21 20:12:39 +03:00
parent f2ab7dd263
commit 774a5122fa
2 changed files with 5 additions and 4 deletions

View File

@@ -43,9 +43,6 @@ function pdfs_init($source, $page = 1){
$result = array();
if (!file_exists($source))
return false;
$result['count'] = pdfs_count($source); // количество страниц
$result['pdfurl'] = SITE.trim(pdfs_cachefile($source), '/'); //полный файл на скачку
@@ -56,6 +53,9 @@ function pdfs_init($source, $page = 1){
$fullcachefile = $cachedir.$cachefile;
if (!file_exists($fullcachefile)){
if (!file_exists($source))
return false;
if (!is_dir($cachedir))
mkdir($cachedir);