diff --git a/base.php b/base.php index 4a94cc1..7af0592 100644 --- a/base.php +++ b/base.php @@ -1072,6 +1072,13 @@ abstract class Base return is_array ($config['calibre_directory']); } + public static function useAbsolutePath () { + global $config; + $path = self::getDbDirectory(); + return preg_match ('/^\//', Base::getDbDirectory ()) || // Linux / + preg_match ('/^\w\:/', Base::getDbDirectory ()); // Windows X: + } + public static function noDatabaseSelected () { return self::isMultipleDatabaseEnabled () && is_null (GetUrlParam (DB)); } diff --git a/data.php b/data.php index 33c5343..606dd5c 100644 --- a/data.php +++ b/data.php @@ -150,8 +150,7 @@ class Data extends Base { $urlParam = addURLParameter("", "data", $idData); - if (preg_match ('/^\//', Base::getDbDirectory ()) || // Linux / - preg_match ('/^\w\:/', Base::getDbDirectory ()) || // Windows X: + if (Base::useAbsolutePath () || $rel == Link::OPDS_THUMBNAIL_TYPE || ($type == "epub" && $config['cops_update_epub-metadata'])) {