summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-08-05 17:25:55 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-08-05 17:25:55 +0200
commitb7ada5da57a906083f9723b5795059fc5cd099e6 (patch)
treea0521339842e1f7e1bbe8ca91e9dc1657a2f6266 /apps/files_versions/lib
parentc0e78d984140ecd6a49ac615214b4a68fab0557e (diff)
downloadnextcloud-server-b7ada5da57a906083f9723b5795059fc5cd099e6.tar.gz
nextcloud-server-b7ada5da57a906083f9723b5795059fc5cd099e6.zip
make sure that the versions array contains the correct path
Diffstat (limited to 'apps/files_versions/lib')
-rw-r--r--apps/files_versions/lib/versions.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index a9d51b2c58b..7fadf81426b 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -265,7 +265,7 @@ class Storage {
$pathinfo = pathinfo($filename);
$versionedFile = $pathinfo['basename'];
- $dir = self::VERSIONS_ROOT . '/' . $pathinfo['dirname'];
+ $dir = \OC\Files\Filesystem::normalizePath(self::VERSIONS_ROOT . '/' . $pathinfo['dirname']);
$dirContent = false;
if ($view->is_dir($dir)) {
@@ -293,7 +293,7 @@ class Storage {
} else {
$versions[$key]['preview'] = \OCP\Util::linkToRoute('core_ajax_versions_preview', array('file' => $userFullPath, 'version' => $timestamp));
}
- $versions[$key]['path'] = $filename;
+ $versions[$key]['path'] = $pathinfo['dirname'] . '/' . $filename;
$versions[$key]['name'] = $versionedFile;
$versions[$key]['size'] = $view->filesize($dir . '/' . $entryName);
}