From 72e0ad13a252e5d7f1b76be8554e53edd849465d Mon Sep 17 00:00:00 2001 From: Michal Skorczak Date: Wed, 13 Nov 2024 20:58:29 +0000 Subject: [PATCH] Updated: added comment to discourage people from making the same mistake, removed swap file --- src/main.zig | 1 + src/public/.index.html.swp | Bin 12288 -> 0 bytes 2 files changed, 1 insertion(+) delete mode 100644 src/public/.index.html.swp diff --git a/src/main.zig b/src/main.zig index c323716..54a0c3d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -61,6 +61,7 @@ pub fn blog(self: *Self, req: zap.Request) void { // looking for /blog?post=post_name if(req.getParamSlice("post")) |value| { std.log.info("post name: {s}", .{value}); + // THIS IS SO DANGEROUS WHY DID I LET THIS THROUGH AHAHAHAHA const filepath = std.fmt.allocPrint(self.allocator, "src/public/blog/{s}", .{value}) catch return; defer self.allocator.free(filepath); const file_content = std.fs.cwd().readFileAlloc(self.allocator, filepath, std.math.maxInt(usize)) catch return; diff --git a/src/public/.index.html.swp b/src/public/.index.html.swp deleted file mode 100644 index b71de28b4786dbb2b3de86e4a2f69cbcf20eb993..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2zi$&U6vtguh6)M@MwY8Pz`(^x%8wS^MM$)w2nr$)el5tkbMH*=&R5$>lS;rJ z(G>|cMs~yiBO8AJ3@rQy3~W4K5?ZlTDii2g`pS3D?>)c!JTFn)t>3@C<}KEm1jY$M zUcYK4J1f)V{j+JJm9oyf-^k5|(zU^GdmqQ=E+MPD!I>Eyv9j0AWW;0A=Nb?M13E zR`((+RWS#vu;|G+q+qwAuyk+430xzaULepva}vt?ha{cZD}qu)+@@5q!y{%or6J5>EueYRWr`_q9!LWy^A9snf6z@`slmv{&w~ z+m+?EGRfeUxpR#@7E6!T+S{v})Qhw-Mgc2Xgp?Pm80M-6-458OHdkdPiw#eU47Rny zOqf&%3)Q$YXAHou4pp^Oa|RcZ3(LKN=OUyVVz{Mr436WI5z@-VN}Gwj>_>)4u*2bt z&7SOs^r7Er`&U(7ax1$T^mmf!j1-}W6LIE`J^NB@l}baE6HmG&W1EJt=*vj>)yp{m eDlN}^6Y)%hjoredlxyP-bI-2(i>`5_hW!GVFjFi5