Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Merge branch 'dev' into merge-release/14.3-20240723033638

Marcello Rochae41d6e7dce87
diff --cc modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_info_query.rb
index a6a4bbcaa26,779c3d8e4c6..4f3772f1a20
--- a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_info_query.rb
+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_info_query.rb
@@@ -125,22 -130,23 +130,23 @@@ module Storage
)
end
end
- )
- end
- end
- # rubocop:enable Metrics/AbcSize
+ # rubocop:enable Metrics/AbcSize
- def location(file_path, mimetype)
- prefix = "files/"
- idx = file_path.index(prefix)
- return "/" if idx == nil
+ def location(file_path, mimetype)
+ prefix = "files/"
- idx = file_path.rindex(prefix)
++ idx = file_path.index(prefix)
+ return "/" if idx == nil
- idx += prefix.length - 1
- # Remove the following when /filesinfo starts responding with a trailing slash for directory paths
- # in all supported versions of OpenProjectIntegation Nextcloud App.
- file_path << "/" if mimetype == "application/x-op-directory" && file_path[-1] != "/"
- Util.escape_path(file_path[idx..])
+ idx += prefix.length - 1
+ # Remove the following when /filesinfo starts responding with a trailing slash for directory paths
+ # in all supported versions of OpenProjectIntegation Nextcloud App.
+ file_path << "/" if mimetype == "application/x-op-directory" && file_path[-1] != "/"
+
+ UrlBuilder.path(file_path[idx..])
+ end
+ end
+ end
end
end
end