fix: Add encoding parameter to rclone S3 config to prevent filename quoting

Files with spaces like 'Hello World.md' were being displayed with single
quotes as ''Hello World.md'' on the server due to rclone's default S3
encoding behavior.

This fix adds 'encoding = Slash,InvalidUtf8' to the rclone configuration,
which tells rclone to only encode slashes and invalid UTF-8, not spaces
or other common filename characters.

Fixes #406

Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com>
This commit is contained in:
claude[bot]
2025-10-31 01:36:41 +00:00
parent a7d7cc5ee6
commit 8af7ae0354
@@ -145,6 +145,9 @@ def add_tenant_to_rclone_config(
config.set(section_name, "secret_access_key", secret_key)
config.set(section_name, "endpoint", endpoint)
config.set(section_name, "region", region)
# Prevent unnecessary encoding of filenames (only encode slashes and invalid UTF-8)
# This prevents files with spaces like "Hello World.md" from being quoted
config.set(section_name, "encoding", "Slash,InvalidUtf8")
# Save updated config
save_rclone_config(config)