aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/src
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-02-22 23:57:54 +0100
committerGitHub <noreply@github.com>2024-02-22 23:57:54 +0100
commitbd10b485f866c0d005e03122601a2f1a723aab6e (patch)
tree3e00143c7758eae7e3729295a0bae1208a0f61c3 /apps/files_versions/src
parent0254af804aa8e24248567107f00130e508b96270 (diff)
parentc8868a3bb08f0503658341ce7a4b8b58c81ac747 (diff)
downloadnextcloud-server-bd10b485f866c0d005e03122601a2f1a723aab6e.tar.gz
nextcloud-server-bd10b485f866c0d005e03122601a2f1a723aab6e.zip
Merge pull request #43756 from nextcloud/chore/encodepath
chore(files): replace `encodeFilePath` by `encodePath` from `@nextcloud/paths`
Diffstat (limited to 'apps/files_versions/src')
-rw-r--r--apps/files_versions/src/utils/versions.ts10
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/files_versions/src/utils/versions.ts b/apps/files_versions/src/utils/versions.ts
index b33f75aefa7..e3555339b27 100644
--- a/apps/files_versions/src/utils/versions.ts
+++ b/apps/files_versions/src/utils/versions.ts
@@ -21,18 +21,16 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+import type { FileStat, ResponseDataDetailed } from 'webdav'
-import { getCurrentUser } from '@nextcloud/auth'
-import { joinPaths } from '@nextcloud/paths'
import { generateRemoteUrl, generateUrl } from '@nextcloud/router'
+import { getCurrentUser } from '@nextcloud/auth'
+import { joinPaths, encodePath } from '@nextcloud/paths'
import moment from '@nextcloud/moment'
-import { encodeFilePath } from '../../../files/src/utils/fileUtils.ts'
-
import client from '../utils/davClient.js'
import davRequest from '../utils/davRequest.js'
import logger from '../utils/logger.js'
-import type { FileStat, ResponseDataDetailed } from 'webdav'
export interface Version {
fileId: string, // The id of the file associated to the version.
@@ -120,7 +118,7 @@ function formatVersion(version: any, fileInfo: any): Version {
hasPreview: version.props['has-preview'] === 1,
previewUrl,
url: joinPaths('/remote.php/dav', version.filename),
- source: generateRemoteUrl('dav') + encodeFilePath(version.filename),
+ source: generateRemoteUrl('dav') + encodePath(version.filename),
fileVersion: version.basename,
}
}