mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-11 16:35:38 +00:00
fix for determine fileType
didn't work if the file didn't have a file extension but the path contains a dot.
This commit is contained in:
parent
140926be96
commit
4145b67dd6
|
@ -118,9 +118,9 @@ function import_folder($dirname, $folder, $setfiledate, $setfolderdate, $metadat
|
|||
|
||||
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
||||
$mimetype = finfo_file($finfo, $path);
|
||||
$lastDotIndex = strrpos($path, ".");
|
||||
$lastDotIndex = strrpos($name, ".");
|
||||
if (is_bool($lastDotIndex) && !$lastDotIndex) $filetype = ".";
|
||||
else $filetype = substr($path, $lastDotIndex);
|
||||
else $filetype = substr($name, $lastDotIndex);
|
||||
|
||||
// echo $mimetype." - ".$filetype." - ".$path."\n";
|
||||
if($res = $folder->addDocument($name, $comment, $expires, $user, $keywords,
|
||||
|
|
Loading…
Reference in New Issue
Block a user