From 08903bfa15cfb9bee6e44addf4c86da8feaeef48 Mon Sep 17 00:00:00 2001 From: Talyx Date: Thu, 24 Feb 2022 18:12:26 +0300 Subject: [PATCH] root file/dir --- src/Server/ServerConfig.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Server/ServerConfig.cpp b/src/Server/ServerConfig.cpp index 3b83e09..1fd97c8 100644 --- a/src/Server/ServerConfig.cpp +++ b/src/Server/ServerConfig.cpp @@ -417,8 +417,8 @@ bool ServerConfig::checkFileAndDir(location *loc) if (!root.empty()) { - if (isDir(root) != 0) - throw ConfigException("Directory " + root + " not found!"); + if (isDir(root) != 0 && isFile(root) != 0) + throw ConfigException("File or directory " + root + " not found!"); } if (!upload_dir.empty()) {