Fixed detection of absolute path. Add a Windows mapped drive detection.
Reported by Kevnancy
This commit is contained in:
parent
bef7bbf2c3
commit
8cfddc0d11
4
data.php
4
data.php
|
@ -101,7 +101,9 @@ class Data extends Base {
|
|||
$textData = "&data=" . $idData;
|
||||
}
|
||||
|
||||
if (preg_match ('/^\//', $config['calibre_directory']) || ($type == "epub" && $config['cops_update_epub-metadata']))
|
||||
if (preg_match ('/^\//', $config['calibre_directory']) || // Linux /
|
||||
preg_match ('/^\w\:/', $config['calibre_directory']) || // Windows X:
|
||||
($type == "epub" && $config['cops_update_epub-metadata']))
|
||||
{
|
||||
if ($type != "jpg") $textData .= "&type=" . $type;
|
||||
return new Link ("fetch.php?id=$book->id" . $textData, $mime, $rel, $title);
|
||||
|
|
Loading…
Reference in a new issue