mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
addSepDir() doesn't add dir separator to empty string
also remove space from string
This commit is contained in:
parent
2bf7bd0a4e
commit
c1b28071df
|
@ -552,9 +552,11 @@ function get_extension($mimetype) { /* {{{ */
|
||||||
* trailing directory separator
|
* trailing directory separator
|
||||||
*/
|
*/
|
||||||
function addDirSep($str) { /* {{{ */
|
function addDirSep($str) { /* {{{ */
|
||||||
if(substr($str, -1, 1) != DIRECTORY_SEPARATOR)
|
if(trim($str) == '')
|
||||||
return $str.DIRECTORY_SEPARATOR;
|
return '';
|
||||||
|
if(substr(trim($str), -1, 1) != DIRECTORY_SEPARATOR)
|
||||||
|
return trim($str).DIRECTORY_SEPARATOR;
|
||||||
else
|
else
|
||||||
return $str;
|
return trim($str);
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user