aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib/Storage.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_versions/lib/Storage.php')
-rw-r--r--apps/files_versions/lib/Storage.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index 0b7debc126a..676d94d2fb7 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -588,6 +588,10 @@ class Storage {
// Check that the version does not have a label.
$path = $versionsRoot->getRelativePath($info->getPath());
+ if ($path === null) {
+ throw new DoesNotExistException('Could not find relative path of (' . $info->getPath() . ')');
+ }
+
$node = $userFolder->get(substr($path, 0, -strlen('.v'.$version)));
try {
$versionEntity = $versionsMapper->findVersionForFileId($node->getId(), $version);