summaryrefslogtreecommitdiffstats
path: root/src/jsbundle.c
diff options
context:
space:
mode:
authorAnton L. Šijanec <anton@sijanec.eu>2020-05-01 15:18:12 +0200
committerAnton L. Šijanec <anton@sijanec.eu>2020-05-01 15:18:12 +0200
commit6961e4237f24306ab2475f4f527a7c802134c4d9 (patch)
tree0d18e9dd78fe3dee482872a65fbf823e00cd31db /src/jsbundle.c
parentfolder structure README.mf (diff)
downloadbverbose-6961e4237f24306ab2475f4f527a7c802134c4d9.tar
bverbose-6961e4237f24306ab2475f4f527a7c802134c4d9.tar.gz
bverbose-6961e4237f24306ab2475f4f527a7c802134c4d9.tar.bz2
bverbose-6961e4237f24306ab2475f4f527a7c802134c4d9.tar.lz
bverbose-6961e4237f24306ab2475f4f527a7c802134c4d9.tar.xz
bverbose-6961e4237f24306ab2475f4f527a7c802134c4d9.tar.zst
bverbose-6961e4237f24306ab2475f4f527a7c802134c4d9.zip
Diffstat (limited to 'src/jsbundle.c')
-rw-r--r--src/jsbundle.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/jsbundle.c b/src/jsbundle.c
index c585ff5..a2f9b61 100644
--- a/src/jsbundle.c
+++ b/src/jsbundle.c
@@ -1,20 +1,21 @@
+#pragma once
#include <stdlib.h>
#include <stdio.h>
#include <dirent.h>
#include <string.h>
#include <mkdirp.c>
#include <fopenmkdir.c>
-
+#include <limits.h>
int bundle_js(char* bundle_filename, char* js_source_folder_name, char* file_extension) {
// char bundle_filename[64] = "../dist/js/bundle.js";
// char js_source_folder_name[64] = "../assets/js/";
// char file_extension[64] = ".js";
- char source_filename[64];
+ char source_filename[NAME_MAX];
FILE * bundle_file;
FILE * source_file;
bundle_file = fopen_mkdir(bundle_filename, "w");
if(bundle_file == NULL) {
- char bundle_folderpath[256];
+ char bundle_folderpath[PATH_MAX];
strcpy(bundle_folderpath, bundle_filename);
char *p = strchr(bundle_folderpath, '/');
if (!p) {