From f4cd70a9fff8ce59474c72cfd27cbb7860d6de0b Mon Sep 17 00:00:00 2001 From: Paul Kulchenko Date: Sun, 20 Mar 2022 11:05:44 -0700 Subject: [PATCH] Enable using symlinked directories with redbean -A flag --- tool/net/redbean.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tool/net/redbean.c b/tool/net/redbean.c index ce32ba9a9..1433a5be9 100644 --- a/tool/net/redbean.c +++ b/tool/net/redbean.c @@ -3526,7 +3526,8 @@ static void StorePath(const char *dirpath) { DIR *d; char *path; struct dirent *e; - if (!isdirectory(dirpath)) return StoreFile(dirpath); + if (!isdirectory(dirpath) && !endswith(dirpath, "/")) + return StoreFile(dirpath); if (!(d = opendir(dirpath))) DIEF("Can't open %`'s", dirpath); while ((e = readdir(d))) { if (strcmp(e->d_name, ".") == 0) continue;