From 8af7ae0354359ab1c009229b5ec39ef813f62bcb Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 01:36:41 +0000 Subject: [PATCH] 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 --- src/basic_memory/cli/commands/cloud/rclone_config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/basic_memory/cli/commands/cloud/rclone_config.py b/src/basic_memory/cli/commands/cloud/rclone_config.py index 2f648fb2..1441533c 100644 --- a/src/basic_memory/cli/commands/cloud/rclone_config.py +++ b/src/basic_memory/cli/commands/cloud/rclone_config.py @@ -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)