From afe95ae2fd49955573b21fbac62cda1013849155 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Tue, 2 May 2017 10:40:51 +0200 Subject: [PATCH] Strip trailing slashes from symlinks This avoids double slashes and issues they cause in the ftp browser. Daniel Gustafsson --- tools/ftp/spider_ftp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ftp/spider_ftp.py b/tools/ftp/spider_ftp.py index c9e50e9a..4ee8575b 100755 --- a/tools/ftp/spider_ftp.py +++ b/tools/ftp/spider_ftp.py @@ -38,7 +38,7 @@ def parse_directory(dirname, rootlen): # This is a symbolic link mynode[f] = { 't': 'l', - 'd': os.readlink(fn), + 'd': os.readlink(fn).strip("/"), } else: # This is a subdirectory, recurse into it, unless it happens -- 2.39.5