mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 16:53:08 -07:00
Throw error exception properly
This commit is contained in:
parent
3851e76179
commit
e06e1d9911
1 changed files with 1 additions and 5 deletions
|
@ -155,11 +155,7 @@ void WebApplication::sendWebUIFile()
|
||||||
if (m_isAltUIUsed)
|
if (m_isAltUIUsed)
|
||||||
{
|
{
|
||||||
if (!Utils::Fs::isRegularFile(localPath))
|
if (!Utils::Fs::isRegularFile(localPath))
|
||||||
{
|
throw InternalServerErrorHTTPError(tr("Unacceptable file type, only regular file is allowed."));
|
||||||
status(500, u"Internal Server Error"_qs);
|
|
||||||
print(tr("Unacceptable file type, only regular file is allowed."), Http::CONTENT_TYPE_TXT);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QFileInfo fileInfo {localPath.data()};
|
QFileInfo fileInfo {localPath.data()};
|
||||||
while (Path(fileInfo.filePath()) != m_rootFolder)
|
while (Path(fileInfo.filePath()) != m_rootFolder)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue