Ignore:
Timestamp:
Oct 28, 2017, 7:17:42 PM (23 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Apply `normpath` when getting the working directory

When getting the current working directory of the FTP session, apply
`normpath`. This makes sure that an initial `FTPHost.getcwd` call
returns the current working without a trailing slash (with the
exception of the current directory being `/`).

ticket: 113
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ftputil/host.py

    r1676 r1677  
    7878        with ftputil.error.ftplib_error_to_ftp_os_error:
    7979            self._cached_current_dir = \
    80               ftputil.tool.as_unicode(self._session.pwd())
     80              self.path.normpath(ftputil.tool.as_unicode(self._session.pwd()))
    8181        # Associated `FTPHost` objects for data transfer.
    8282        self._children = []
Note: See TracChangeset for help on using the changeset viewer.