Browse Source

Remove compile-time conditional

This checking should be universally applied and not limited to certain OS.
adaptive-webui-19844
Chocobo1 2 years ago
parent
commit
5d1115f591
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/webui/webapplication.cpp

2
src/webui/webapplication.cpp

@ -165,14 +165,12 @@ void WebApplication::sendWebUIFile()
if (m_isAltUIUsed) if (m_isAltUIUsed)
{ {
#ifdef Q_OS_UNIX
if (!Utils::Fs::isRegularFile(localPath)) if (!Utils::Fs::isRegularFile(localPath))
{ {
status(500, u"Internal Server Error"_qs); status(500, u"Internal Server Error"_qs);
print(tr("Unacceptable file type, only regular file is allowed."), Http::CONTENT_TYPE_TXT); print(tr("Unacceptable file type, only regular file is allowed."), Http::CONTENT_TYPE_TXT);
return; return;
} }
#endif
QFileInfo fileInfo {localPath.data()}; QFileInfo fileInfo {localPath.data()};
while (Path(fileInfo.filePath()) != m_rootFolder) while (Path(fileInfo.filePath()) != m_rootFolder)

Loading…
Cancel
Save