summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xftp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ftp.py b/ftp.py
index b2c4a3d..c6ca471 100755
--- a/ftp.py
+++ b/ftp.py
@@ -308,7 +308,8 @@ with FTP() as ftp:
if cmd.startswith("!"):
cmd, value = "!", cmd[1:]
else:
- cmd, value = cmd.split(" ", 2)
+ cmd, value = re.split(r"(?<!\\) ", cmd, 2)
+ value = value.replace("\\ ", " ")
except ValueError:
value = ""
if not cmd: