~sschwarzer/ftputil

d5f2a7bfdfbe3f636bb5737224ea9b3286b522e5 — Stefan Schwarzer 1 year, 4 months ago 2614fb0
Explain cache invalidation in `FTPHost.rename`
1 files changed, 2 insertions(+), 0 deletions(-)

M ftputil/host.py
M ftputil/host.py => ftputil/host.py +2 -0
@@ 908,6 908,8 @@ class FTPHost:
            try:
                with ftputil.error.ftplib_error_to_ftp_os_error:
                    self._session.rename(source_arg, target_arg)
            # Always invalidate the cache entries in case the rename succeeds
            # on the server, but the server doesn't manage to tell the client.
            finally:
                source_absolute_path = self.path.abspath(source_arg)
                target_absolute_path = self.path.abspath(target_arg)