summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib/versions.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_versions/lib/versions.php')
-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);
}