Skip to content

Commit 4dc2cb1

Browse files
authored
Update pywwwget_bard.py
1 parent ef7dde5 commit 4dc2cb1

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

pywwwget_bard.py

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

263263
def detect_cwd(ftp, file_dir):
264-
if not file_dir or file_dir in ("/", ""): return False
264+
"""
265+
Test whether cwd into file_dir works. Returns True if it does,
266+
False if not (so absolute paths should be used).
267+
"""
268+
if not file_dir:
269+
return False # nothing to cwd into
265270
try:
266271
ftp.cwd(file_dir)
267272
return True

0 commit comments

Comments
 (0)