empty folder fix

This commit is contained in:
lllllllillllllillll 2024-05-20 19:10:20 -07:00
parent 57f080ec0d
commit 03be1187ef
7 changed files with 8 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
**/db.sqlite
**/node_modules
**/appdata
.github
.git

View File

View File

@ -61,6 +61,8 @@ export const Apps = async (req, res) => {
last_page = Math.ceil(compose_files.length/28);
compose_files.forEach(file => {
if (file == '.gitignore') { return; }
let compose = readFileSync(`templates/compose/${file}/compose.yaml`, 'utf8');
let compose_data = parse(compose);
let service_name = Object.keys(compose_data.services)
@ -541,6 +543,7 @@ export const Upload = (req, res) => {
let files = readdirSync('templates/tmp/');
for (let i = 0; i < files.length; i++) {
if (files[i].endsWith('.zip')) {
let zip = new AdmZip(`templates/tmp/${files[i]}`);
zip.extractAllTo('templates/compose', true);

2
templates/compose/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
templates/tmp/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

View File