From 9ea35e1b741ba8a21368e4839b0e196924a766fd Mon Sep 17 00:00:00 2001 From: Stefan Hammer Date: Sat, 27 Jul 2024 05:23:24 +0200 Subject: [PATCH] [ftp] Don't append slash to NLST in exists() (#1438) --- storages/backends/ftp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storages/backends/ftp.py b/storages/backends/ftp.py index ddcb87f9..2c911434 100644 --- a/storages/backends/ftp.py +++ b/storages/backends/ftp.py @@ -213,7 +213,7 @@ def exists(self, name): self._start_connection() try: - nlst = self._connection.nlst(os.path.dirname(name) + "/") + nlst = self._connection.nlst(os.path.dirname(name)) if name in nlst or os.path.basename(name) in nlst: return True else: