Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix uri dirname parsing for swift restore
The swift protocol is the only file storage used by `EvmDatabaseOps` at this time that uses query params as part of setting it's options. The previous implementation of `.with_file_storage` would use a simple `File.dirname` to determine the mount point. This causes the query params to be completely stripped from the uri, and messes with the configuration set by the user via the query params. There is also a quirk with the implementation of `URI::FTP` (stdlib) that overrides `.path` differently since it swaps it's `"/"` characters for `"%2F"`, which we don't happening unannounced. So for the fix, we use `URI::Generic.new` directly, and avoid the `URI.parse` method since it will make use of `URI::FTP` in those cases. Split is used as just a convenient way of getting the args for `URI::Generic.new`.
- Loading branch information