Content
View differences
Updated by Eric Schubert over 1 year ago
**TODO**
* `file_path_to_id_map` query returns currently none sanitized paths as keys
* usages
* nextcloud those are used in the sync service
services, also for comparison
* one drive sync service (less then nextcloud)
* file\_path\_to\_id\_map query
* copy\_template\_folder command (nextcloud)
* copy project folder service
* a fair bit of nextcloud queries still working on paths (not harmonized with ##57710)
* This can easily break, if a `/` is forgotten or else
* Create a dedicated class for working with paths which is responsible for comparison and encapsulates all the details.
* Repurpose existing data model `ParentFolder` [https://github.com/opf/openproject/blob/011f74ebe40421f9c234b4bb130099481c442ecd/modules/storages/app/common/storages/peripherals/storage\_parent\_folder\_extractor.rb#L33](https://github.com/opf/openproject/blob/011f74ebe40421f9c234b4bb130099481c442ecd/modules/storages/app/common/storages/peripherals/storage_parent_folder_extractor.rb#L33)
https://github.com/opf/openproject/blob/011f74ebe40421f9c234b4bb130099481c442ecd/modules/storages/app/common/storages/peripherals/storage\_parent\_folder\_extractor.rb#L33
**NEXT STEPS**
* Identify all the class should contain non-sanitized path fragments, so that a stable handling of places where comparison and ecscaping for URL usage is granted (it is also about prediction of behaviour)
* internally the class will use `UrlBuilder` to escape
* the class should have a static parsing method to put in any string (raises exceptions if string contains escaped characters) urls/path happens
* `file_path_to_id_map` query returns currently none sanitized paths as keys
* usages
* nextcloud
* file\_path\_to\_id\_map query
* copy\_template\_folder command (nextcloud)
* copy project folder service
* a fair bit of nextcloud queries still working on paths (not harmonized with ##57710)
* This can easily break, if a `/` is forgotten or else
* Create a dedicated class for working with paths which is responsible for comparison and encapsulates all the details.
* Repurpose existing data model `ParentFolder` [https://github.com/opf/openproject/blob/011f74ebe40421f9c234b4bb130099481c442ecd/modules/storages/app/common/storages/peripherals/storage\_parent\_folder\_extractor.rb#L33](https://github.com/opf/openproject/blob/011f74ebe40421f9c234b4bb130099481c442ecd/modules/storages/app/common/storages/peripherals/storage_parent_folder_extractor.rb#L33)
**NEXT STEPS**
* internally the class will use `UrlBuilder` to escape
* the class should have a static parsing method to put in any string (raises exceptions if string contains escaped characters)