mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
Throw error exception properly
This commit is contained in:
parent
3851e76179
commit
e06e1d9911
@ -155,11 +155,7 @@ void WebApplication::sendWebUIFile()
|
||||
if (m_isAltUIUsed)
|
||||
{
|
||||
if (!Utils::Fs::isRegularFile(localPath))
|
||||
{
|
||||
status(500, u"Internal Server Error"_qs);
|
||||
print(tr("Unacceptable file type, only regular file is allowed."), Http::CONTENT_TYPE_TXT);
|
||||
return;
|
||||
}
|
||||
throw InternalServerErrorHTTPError(tr("Unacceptable file type, only regular file is allowed."));
|
||||
|
||||
QFileInfo fileInfo {localPath.data()};
|
||||
while (Path(fileInfo.filePath()) != m_rootFolder)
|
||||
|
Loading…
x
Reference in New Issue
Block a user