From 72e2cabf40ace9699bbea5983a7a73c6ff7cf6ba Mon Sep 17 00:00:00 2001
From: Christopher Ng <chrng8@gmail.com>
Date: Mon, 6 Mar 2023 10:24:31 -0800
Subject: Fix download URL for versions

Signed-off-by: Christopher Ng <chrng8@gmail.com>
---
 apps/files_versions/src/components/Version.vue | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'apps/files_versions/src/components/Version.vue')

diff --git a/apps/files_versions/src/components/Version.vue b/apps/files_versions/src/components/Version.vue
index 6a9bac977a8..e584eb887a3 100644
--- a/apps/files_versions/src/components/Version.vue
+++ b/apps/files_versions/src/components/Version.vue
@@ -116,7 +116,7 @@ import { NcActionButton, NcActionLink, NcListItem, NcModal, NcButton, NcTextFiel
 import moment from '@nextcloud/moment'
 import { translate } from '@nextcloud/l10n'
 import { joinPaths } from '@nextcloud/paths'
-import { generateUrl } from '@nextcloud/router'
+import { generateUrl, getRootUrl } from '@nextcloud/router'
 import { loadState } from '@nextcloud/initial-state'
 
 export default {
@@ -204,9 +204,9 @@ export default {
 		 */
 		downloadURL() {
 			if (this.isCurrent) {
-				return joinPaths('/remote.php/webdav', this.fileInfo.path, this.fileInfo.name)
+				return getRootUrl() + joinPaths('/remote.php/webdav', this.fileInfo.path, this.fileInfo.name)
 			} else {
-				return this.version.url
+				return getRootUrl() + this.version.url
 			}
 		},
 
-- 
cgit v1.2.3

