Add missing trailing slash to user defined attachment storage location
authorMaximilian Mader <max@bastelstu.be>
Fri, 28 Mar 2014 13:25:52 +0000 (14:25 +0100)
committerMaximilian Mader <max@bastelstu.be>
Fri, 28 Mar 2014 13:25:52 +0000 (14:25 +0100)
See http://www.woltlab.com/forum/index.php/Thread/223867-Fehler-Dateianh%C3%A4nge/?postID=1333514#post1333514

wcfsetup/install/files/lib/data/attachment/Attachment.class.php

index 93a7040211bf33102b349edcf81a70815209e957..65edbbba2c5e64243024d7c37f037ee61646fda4 100644 (file)
@@ -4,6 +4,7 @@ use wcf\data\object\type\ObjectTypeCache;
 use wcf\data\DatabaseObject;
 use wcf\system\request\IRouteController;
 use wcf\system\WCF;
+use wcf\util\FileUtil;
 
 /**
  * Represents an attachment.
@@ -197,7 +198,7 @@ class Attachment extends DatabaseObject implements IRouteController {
         */
        public static function getStorage() {
                if (ATTACHMENT_STORAGE) {
-                       return ATTACHMENT_STORAGE;
+                       return FileUtil::addTrailingSlash(ATTACHMENT_STORAGE);
                }
                
                return WCF_DIR . 'attachments/';