]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove doubled slash between folder and path
authorJoas Schilling <nickvergessen@gmx.de>
Mon, 11 Aug 2014 14:50:52 +0000 (16:50 +0200)
committerJoas Schilling <nickvergessen@gmx.de>
Mon, 11 Aug 2014 14:50:52 +0000 (16:50 +0200)
lib/private/files/cache/updater.php

index f15c203cd5828d1a5909918b741e8ba34a2f1ef0..8bfa5fc74cabd4ce38c2663b5ed08bcf6f821e6d 100644 (file)
@@ -114,7 +114,7 @@ class Updater {
        /**
         * get file owner and path
         * @param string $filename
-        * @return string[] with the oweners uid and the owners path
+        * @return string[] with the owner's uid and the owner's path
         */
        private static function getUidAndFilename($filename) {
 
@@ -124,12 +124,12 @@ class Updater {
                if ($uid != \OCP\User::getUser()) {
                        $info = \OC\Files\Filesystem::getFileInfo($filename);
                        if (!$info) {
-                               return array($uid, '/files/' . $filename);
+                               return array($uid, '/files' . $filename);
                        }
                        $ownerView = new \OC\Files\View('/' . $uid . '/files');
                        $filename = $ownerView->getPath($info['fileid']);
                }
-               return array($uid, '/files/' . $filename);
+               return array($uid, '/files' . $filename);
        }
 
        /**
@@ -139,8 +139,7 @@ class Updater {
         * @param string $time
         */
        static public function correctFolder($path, $time) {
-               if ($path !== '' && $path !== '/') {
-
+               if ($path !== '' && $path !== '/' && $path !== '\\') {
                        list($owner, $realPath) = self::getUidAndFilename(dirname($path));
 
                        /**