Portability for filepath in File
This commit is contained in:
parent
41b64cb8a3
commit
a3b265a477
|
@ -347,8 +347,8 @@ class File extends Managed_DataObject
|
||||||
}
|
}
|
||||||
$dir = common_config('attachments', 'dir');
|
$dir = common_config('attachments', 'dir');
|
||||||
|
|
||||||
if ($dir[strlen($dir)-1] != '/') {
|
if (!in_array($dir[mb_strlen($dir)-1], ['/', '\\'])) {
|
||||||
$dir .= '/';
|
$dir .= DIRECTORY_SEPARATOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $dir . $filename;
|
return $dir . $filename;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user