Skip to content

Commit 8af7ae0

Browse files
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>
1 parent a7d7cc5 commit 8af7ae0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/basic_memory/cli/commands/cloud/rclone_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ def add_tenant_to_rclone_config(
145145
config.set(section_name, "secret_access_key", secret_key)
146146
config.set(section_name, "endpoint", endpoint)
147147
config.set(section_name, "region", region)
148+
# Prevent unnecessary encoding of filenames (only encode slashes and invalid UTF-8)
149+
# This prevents files with spaces like "Hello World.md" from being quoted
150+
config.set(section_name, "encoding", "Slash,InvalidUtf8")
148151

149152
# Save updated config
150153
save_rclone_config(config)

0 commit comments

Comments
 (0)