WebServer: Show icons in directory listings :^)

Just adding some basic folder/file icon makes a big difference here.
This commit is contained in:
Andreas Kling 2020-07-27 22:38:43 +02:00
commit 33d2ecdd79
Notes: sideshowbarker 2024-07-19 04:32:09 +09:00
2 changed files with 50 additions and 10 deletions

View file

@ -25,6 +25,7 @@
*/
#include "Client.h"
#include <AK/MappedFile.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/EventLoop.h>
#include <LibCore/File.h>
@ -75,6 +76,11 @@ int main(int argc, char** argv)
server->listen({}, port);
printf("Listening on 0.0.0.0:%d\n", port);
if (unveil("/res/icons", "r") < 0) {
perror("unveil");
return 1;
}
if (unveil(real_root_path.characters(), "r") < 0) {
perror("unveil");
return 1;