mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:38:11 +00:00
WebServer: Show icons in directory listings :^)
Just adding some basic folder/file icon makes a big difference here.
This commit is contained in:
parent
96dce6893f
commit
33d2ecdd79
2 changed files with 50 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue