summaryrefslogtreecommitdiffstats
path: root/Lib/ftplib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-07-06 15:19:36 (GMT)
committerGuido van Rossum <guido@python.org>1993-07-06 15:19:36 (GMT)
commitdf5638662d95c08d48da0ac236dec4e44e93874e (patch)
treeeecddf3bcbd5da4f4a5a922a577500f3ab4095db /Lib/ftplib.py
parentf1dc56632881fe4e5beed047580bf927679f3669 (diff)
downloadcpython-df5638662d95c08d48da0ac236dec4e44e93874e.zip
cpython-df5638662d95c08d48da0ac236dec4e44e93874e.tar.gz
cpython-df5638662d95c08d48da0ac236dec4e44e93874e.tar.bz2
* posixpath.py: Fix border cases in normpath ('/foo/..' should return '/')
* ftplib.py: made cwd() use 'CDUP' when dirname is '..' * FL.py: added new constant FL_PLACE_FULLSCREEN
Diffstat (limited to 'Lib/ftplib.py')
-rw-r--r--Lib/ftplib.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index e846ffe..8342b09 100644
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -336,7 +336,11 @@ class FTP:
# Change to a directory
def cwd(self, dirname):
- self.voidcmd('CWD ' + dirname)
+ if dirname == '..':
+ cmd = 'CDUP'
+ else:
+ cmd = 'CWD ' + dirname
+ self.voidcmd(cmd)
# Retrieve the size of a file
def size(self, filename):