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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#50987] enforced parent folder object in files query
Eric Schubert2d5ef1a82132
diff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_query.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_query.rbindex 4c22a48461b..f772fae7bd2 100644--- a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_query.rb+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/files_query.rb@@ -72,9 +72,9 @@ module Storages::Peripherals::StorageInteraction::Nextcloudprivatedef requested_folder(folder)- return '' if folder.nil?+ return '' if folder.root?- Util.escape_path(folder)+ Util.escape_path(folder.path)end# rubocop:disable Metrics/AbcSizediff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/files_query.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/files_query.rbindex 20c2122a093..c8c388862fa 100644--- a/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/files_query.rb+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/files_query.rb@@ -107,21 +107,20 @@ module Storagesenddef empty_response(folder)- files_result = if folder.root?- StorageFiles.new([], root(Digest::SHA256.hexdigest('i_am_root')), [])- else- StorageFiles.new(- [],- StorageFile.new(- id: Digest::SHA256.hexdigest(folder),- name: folder.split('/').last,- location: folder,- permissions: %i[readable writeable]- ),- forge_ancestors(path: folder)- )- end- ServiceResult.success(result: files_result)+ path = folder.path++ ServiceResult.success(+ result: StorageFiles.new(+ [],+ StorageFile.new(+ id: Digest::SHA256.hexdigest(path),+ name: path.split('/').last,+ location: path,+ permissions: %i[readable writeable]+ ),+ forge_ancestors(path:)+ )+ )enddef extract_location(parent_reference, file_name = '')@@ -170,7 +169,7 @@ module Storagesdef uri_path_for(folder)return "/v1.0/drives/#{@storage.drive_id}/root/children" if folder.root?- "/v1.0/drives/#{@storage.drive_id}/root:#{encode_path(folder)}:/children"+ "/v1.0/drives/#{@storage.drive_id}/root:#{encode_path(folder.path)}:/children"enddef encode_path(path)