Skip to contentSkip to conversation

fetch2/sftp: Fix fetching URIs with spaces

PATCH New Daniel Ammann 1 participant 1 message Mar 17, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fetch2/sftp: Fix fetching URIs with spaces

Spaces can be used in URIs with %20, but the URI needs to be quoted.

---
 lib/bb/fetch2/sftp.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/fetch2/sftp.py +1 -1
index f87f292e5..7884cce94 100644
@@ -103,7 +103,7 @@ class SFTP(FetchMethod):
         if path[:3] == '/~/':
             path = path[3:]
 
-        remote = '%s%s:%s' % (user, urlo.hostname, path)
+        remote = '"%s%s:%s"' % (user, urlo.hostname, path)
 
         cmd = '%s %s %s %s' % (basecmd, port, remote, lpath)
 
Signature · 1 line
2.30.2