Ignore:
Timestamp:
Oct 28, 2017, 10:49:35 PM (2 years ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Handle infinite link chains in `isdir` and `isfile`

If `FTPHost.path.isdir` and `FTPHost.path.isfile` run into an infinite
link chain, return `False`, as the corresponding functions in
`os.path` do.

Before, `isdir` and `isfile` would raise a `PermanentError` with the
information that a recursive link chain was detected. This behavior,
in turn, led to a failure in `FTPHost.walk` (see ticket #107).

ticket: 107
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/mock_ftplib.py

    r1602 r1682  
    220220lrwxrwxrwx   1 45854    200            15 Jan 19  2002 bad_link -> python/bad_link
    221221drwxr-sr-x   2 45854    200           512 May  4  2000 dir with spaces
     222drwxr-sr-x   2 45854    200           512 May  4  2000 python
    222223drwxr-sr-x   2 45854    200           512 May  4  2000 file_name_test""",
    223224
Note: See TracChangeset for help on using the changeset viewer.