Changeset 1680:65a09765b238


Ignore:
Timestamp:
Oct 28, 2017, 7:41:54 PM (14 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Add comment on `getcwd` call

Mention that `normpath` has already been applied to the `getcwd`
result, so the reader doesn't have to wonder whether there should
also be calls to `normpath` on the `getcwd` results.

ticket: 113
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ftputil/path.py

    r1678 r1680  
    131131        """
    132132        path = ftputil.tool.as_unicode(path)
    133         # Workaround if we can't go up from the current directory
     133        # Workaround if we can't go up from the current directory.
     134        # The result from `getcwd` should already be normalized.
    134135        if self.normpath(path) == self._host.getcwd():
    135136            return False
     
    152153        """
    153154        path = ftputil.tool.as_unicode(path)
    154         # Workaround if we can't go up from the current directory
     155        # Workaround if we can't go up from the current directory.
     156        # The result from `getcwd` should already be normalized.
    155157        if self.normpath(path) == self._host.getcwd():
    156158            return True
Note: See TracChangeset for help on using the changeset viewer.