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()) {