Skip to content

Commit 2699c0b

Browse files
authored
Update pywwwget_bard.py
1 parent a81b95b commit 2699c0b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

PyWWW/pywwwget_bard.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,12 @@ def _copy_fileobj_to_path(fileobj, path, overwrite=False):
448448
# --------------------------
449449

450450
def detect_cwd(ftp, file_dir):
451-
if not file_dir or file_dir in ("/", ""): return False
451+
"""
452+
Test whether cwd into file_dir works. Returns True if it does,
453+
False if not (so absolute paths should be used).
454+
"""
455+
if not file_dir:
456+
return False # nothing to cwd into
452457
try:
453458
ftp.cwd(file_dir)
454459
return True

0 commit comments

Comments
 (0)