diff --git a/bin/upgrade.sh b/bin/upgrade.sh index 97b3796..243c58a 100755 --- a/bin/upgrade.sh +++ b/bin/upgrade.sh @@ -25,10 +25,19 @@ detectDomainCanConnect () { } -mkdir -p /var/www/downloads +if [ ! -d /var/www/downloads ]; then + mkdir -p /var/www/downloads +fi + cd /var/www/downloads/ -rm -f master.tar.gz -rm -rf machete/ + +if [ -f master.tar.gz ]; then + rm -f master.tar.gz +fi + +if [ -d machete/ ]; then + rm -rf machete/ +fi # 升级machete detect_domain="git.filesite.io" @@ -47,7 +56,7 @@ if [ -f "master.tar.gz" ]; then tar -zxvf master.tar.gz rm -f master.tar.gz - rsync -vruL machete/* /var/www/machete/ \ + rsync -vrL machete/* /var/www/machete/ \ --exclude=www/content/ \ --exclude=www/navs/ \ --exclude=www/girls/ \ diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php index 19f0f2d..40254d9 100644 --- a/themes/beauty/views/site/index.php +++ b/themes/beauty/views/site/index.php @@ -120,9 +120,16 @@ eof; 'directories' => $viewData['menus'], 'files' => $viewData['scanResults'], ); - }else if (!empty($selectedId) && empty($category['directories']) && empty($category['files'])) { + }else if (empty($category['directories']) && $total == 0) { echo <<此目录下没有图片和视频哦,复制照片目录或文件到目录里刷新网页即可。 +
+

咦?没有图片或视频

+

+ 空目录吗?复制照片目录或文件到目录后点右上角“清空缓存数据刷新”图标清空缓存。 +
+ 如果不是空目录,点右上角“清空缓存数据刷新”图标清空缓存,网页有 10 分钟缓存。 +

+
eof; }